服务总线 SQL 过滤器显然无法在 Azure Functions v3 中运行

Service Bus SQL Filter apparently not working in Azure Functions v3

我在我的服务总线实例中创建了一个主题“消息”,并向其添加了一个新订阅。我可以向该主题发送消息,并且 Azure Function v3 触发器被激活得很好。消息被接收并立即显示。 当我添加 sql 过滤器来过滤订阅的消息时,它不再工作了。

到目前为止我做了什么。 在 Azure 门户中创建了一个 sql 过滤器:

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.

我做错了什么?

如评论中所述,可以在 Microsoft Q&A.

中找到此问题的解决方案

为了防止丢失此解决方案,我也将 post 放在这里:

SQL 过滤器值应该用单引号括起来 'test'

Example : sys.To = 'test'

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

Source

如果有人被红色单引号吓到。它们只是红色,但并不表示它有问题。它会很好地工作。