Filter Xml messages on element presence in Azure Topic

25 Views Asked by At

I have an Azure topic and want to filter messages on their XML elements.

<stay>
  ...
</stay>

vs

<flee>
  ...
</flee>

I have understood the SqlFilter is the way to go, but found no information on how to filter on the presens of an element.

1

There are 1 best solutions below

0
Sean Feldman On BEST ANSWER

You cannot filter messages based on the payload. SQL Filters work on headers / properties of the message, not message body. A potential way of achieving what you need is to stamp message headers with the appropriate information for SQL Filters to operate on. A few samples available in the official documentation.