Delen via


CorrelationRuleFilter Class

Definition

Represents the correlation rule filter expression.

public sealed class CorrelationRuleFilter : Azure.Messaging.ServiceBus.Administration.RuleFilter
type CorrelationRuleFilter = class
    inherit RuleFilter
Public NotInheritable Class CorrelationRuleFilter
Inherits RuleFilter
Inheritance
CorrelationRuleFilter

Remarks

A CorrelationRuleFilter 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, Subject, 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 CorrelationRuleFilter provides an efficient shortcut for declarations of filters that deal only with correlation equality. In this case the cost of the lexicographical 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

CorrelationRuleFilter()

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

CorrelationRuleFilter(String)

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

Properties

ApplicationProperties

Application specific properties of the message.

ContentType

Content type of the message.

CorrelationId

Identifier of the correlation.

MessageId

Identifier of the message.

ReplyTo

Address of the queue to reply to.

ReplyToSessionId

Session identifier to reply to.

SessionId

Session identifier.

Subject

Application specific subject.

To

Address to send to.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

Equals(RuleFilter)

Indicates whether the current object is equal to another object of the same type.

GetHashCode()

Serves as the default hash function.

ToString()

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

Operators

Equality(CorrelationRuleFilter, CorrelationRuleFilter)

Compares two CorrelationRuleFilter values for equality.

Inequality(CorrelationRuleFilter, CorrelationRuleFilter)

Compares two CorrelationRuleFilter values for inequality.

Applies to