Reputation: 13
Been through the documentation and still not clear how this works. I have the following function.json:
{
"bindings": [
{
"type": "serviceBusTrigger",
"name": "message",
"direction": "in",
"subscriptionName": "notifications",
"topicName": "order-placed",
"connection": "orders",
"accessRights": "Manage"
}
],
"disabled": false
}
The connection string above is correct as per the doc. The subscription "notifications" does not exist - is this created by Azure functions or do I have to create a subscription for the topic using another mechanism? My function does not get called when I send a message to the bus targetting that topic. No subscription, no errors and no logs. I tried creating the subscription manually and that did not work. What am I missing?
Upvotes: 1
Views: 1207
Reputation: 2724
Here is a sample ServiceBusTopicTrigger on github, and here is the documentation for the ServiceBusTrigger.
Make sure that orders
is an app setting for your app with a valid manage connection string.
If your function app has more than one service bus connection, check to make sure that you're using the correct one in the portal.
If you provide a connection string with manage rights (in the portal you should see manage,send,listen) we will automatically create the topic and subscription for you.
Also, check the host logs for your app, in your storage account or the kudu scm site <yourapp>.scm.azurewebsites.net/debugconsole
-> LogFiles\Application\Functions\Host
Upvotes: 2