skip to Main Content

I have some messages being post to service bus topic. Those messages have some custom properties embedded upon them and we wanted to put filter on the subscription created on that topic.

My properties were like this :
event-type,
event-sub-type

Notice the ‘-‘ character in the name of properties.

But my filter was just wasn’t working at all. What could be reason behind it?

Wanted to create a subscription with filter rule but it didn’t worked.

2

Answers


  1. Chosen as BEST ANSWER

    After scratching head for a good half day and trying atleast dozens of filter variation, I figured out that filters just wasn't working only because of '-' character in the property name.

    The moment I changed "event-type" to "event_type", I started recieving message on that subscription.

    Posting here, so it could save some of the time who could possibily end up into the same situation. Microsoft has been so generous and humble for not putting up any documentation on the custome property names ;)


  2. If you’re using SQL filters and have custom properties with spaces or dashes, you need to enclose the property name within square brackets, as documented in the Arguments section of SQL filter documentation.

    For example

    [my-property] = 'test'
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search