CorrelationFilter Class

Definition

Represents the correlation filter expression.

public sealed class CorrelationFilter : Microsoft.Azure.ServiceBus.Filter
type CorrelationFilter = class
    inherit Filter
Public NotInheritable Class CorrelationFilter
Inherits Filter
Inheritance
CorrelationFilter

Remarks

A CorrelationFilter holds a set of conditions that are matched against one of more of an arriving message's user and system properties. A common use is a match against the CorrelationId property, but the application can also choose to match against ContentType, Label, MessageId, ReplyTo, ReplyToSessionId, SessionId, To, and any user-defined properties. A match exists when an arriving message's value for a property is equal to the value specified in the correlation filter. For string expressions, the comparison is case-sensitive. When specifying multiple match properties, the filter combines them as a logical AND condition, meaning all conditions must match for the filter to match.

The CorrelationFilter provides an efficient shortcut for declarations of filters that deal only with correlation equality. In this case the cost of the lexigraphical analysis of the expression can be avoided. Not only will correlation filters be optimized at declaration time, but they will also be optimized at runtime. Correlation filter matching can be reduced to a hashtable lookup, which aggregates the complexity of the set of defined correlation filters to O(1).

Constructors

CorrelationFilter()

Initializes a new instance of the CorrelationFilter class with default values.

CorrelationFilter(String)

Initializes a new instance of the CorrelationFilter class with the specified correlation identifier.

Properties

ContentType

Content type of the message.

CorrelationId

Identifier of the correlation.

Label

Application specific label.

MessageId

Identifier of the message.

Properties

Application specific properties of the message.

ReplyTo

Address of the queue to reply to.

ReplyToSessionId

Session identifier to reply to.

SessionId

Session identifier.

To

Address to send to.

Methods

Equals(Filter)
Equals(Object)
GetHashCode()
ToString()

Converts the value of the current instance to its equivalent string representation.

Operators

Equality(CorrelationFilter, CorrelationFilter)
Inequality(CorrelationFilter, CorrelationFilter)

Applies to