SQL Filters in service bus not working

Exitare 21 Reputation points
2021-07-09T05:09:37.833+00:00

I created a topic "Messages" in my service bus instance, and added a new subscription to it. I can send messages to this topic and the Azure Function v3 trigger is activated just fine. The message is received and displayed in an instant.
When I add an sql filter to filter messages for a subscription it is not working anymore.

What I did so far.
Created an sql filter in the azure portal:

sys.Label = "Test" -> Not working as no messages are received anymore, even though I verified that the Label attribute is set.    

sys.Label != "Test" Not working as no messages are received anymore, even though I verified that the Label attribute is set and not matching "Test"    

sys.To = "Test" -> Not working, no messages are received. Verified that the messages contain the To member.    

sys.Label is not Null -> This is strangely working.    

What am I doing wrong here?

Sql Filter in portal

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
700 questions
0 comments No comments
{count} votes

Accepted answer
  1. MayankBargali-MSFT 70,936 Reputation points Moderator
    2021-07-12T04:26:49.53+00:00

    Hi @Exitare

    Welcome to Microsoft Q&A! Thanks for posting the question.

    The SQL filter value should be in single quotes 'test'

    Example : sys.To = 'test'

    Make sure that you are defining the message system properties while sending the message to topic.

    113694-image.png

    Feel free to get back to me if you need any assistance.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.