Search code examples
functionazureservicebus

Applying Sqlfilter to ServiceBus topic trigger in Azure Function?


So we have a Azure ServiceBus topic triggering a Azure Function. Problem is we need to apply a filter on the subscription. Json looks like this:

"bindings": [
{
  "name": "mySbMsg",
  "type": "serviceBusTrigger",
  "direction": "in",
  "topicName": "testtopic",
  "subscriptionName": "AllMessages",
  "connection": "RootManageSharedAccessKey",
  "accessRights": "Manage"
}

Any ideas?


Solution

  • we have a Azure ServiceBus topic triggering a Azure Function. Problem is we need to apply a filter on the subscription.

    As far as I know, Azure Functions do not provide a direct way to set up filters for an existing subscription while defining the function bindings and other configuration settings in function.json. If you’d like to apply filters for subscriptions, you could set up filters when you create subscriptions. For more information about creating subscriptions with filters, please refer to this documentation.