0

I would like to add some filters on my Azure service bus topic subscriptions, and filters can only be based on system properties/ user properties rather than the actual payload of message. When I looked through the documentation of Azure serviceBusMessage, I found they didn't provide any methods to set user properties.

My question is that is it possible to set the user properties when using serviceBusMessage in Java?

Coding_Rabbit
  • 1,287
  • 3
  • 22
  • 44

1 Answers1

0

Filters on system properties can be set with format as sys.<system-property-name> below are few samples:

- sys.Label LIKE ‘%Bus%’ ##Filters all messages that contains the string “Bus” in the Label of the BrokeredMessage object.
- user.Country = ‘Austria’ ##same as: Country = ‘Austria’
- sys.Size < 1000
- sys.ForcePersistence = false
- sys.Size < 100 * sys.SequenceNumber

Topic Subscriptions support Rules to filter the messages. Based on the rule created in the Subscription, messages will fall into the appropriate Subscription.

Also refer this documentation to know about How to Set and Get Custom Properties of a Service Bus Message in Logic App

And check MS Docs for filters and actions

SaiKarri-MT
  • 1,174
  • 1
  • 3
  • 8