As explained in MSDN (https://docs.microsoft.com/en-us/azure/service-bus-messaging/topic-filters) SQL Filter and Correlation Filter both uses message's system defined and user defined properties.
Can you please provide an example to show the difference among both?
CodePudding user response:
I have a blog post where all three filter types are explained
- Boolean filters
- Correlation filters
- SQL filters
There are several differences between correlation and SQL filters. Just to list a few
- Correlation filters are intended to operation on a few system properties such as
ContentType
,MessageId
,ReplyTo
,ReplyToSessionId
,SessionId
,To
, andCorrelationId
. SQL filters are not constrained to system properties only and can operation on user/applicaiton properties/headers. - Within a correlation filter, multiple conditions are AND-ed. SQL filter is much more flexible and can use AND as well as OR operations.
- The cost of evaluating filter expression is minimal and almost immediate w/o extra compute required. SQL filters can require more compute but offer more flexibility.