3
votes

I'm trying to set up an Azure Function that I want to trigger when a message is put on a Service Bus queue. However, I can´t get it to work. The first "log.Info" does not trigger.

I deployed an Http trigger together with my Service Bus trigger and that works.

Some screenshots is shown below. I´ve already tried to remove the json string with key "generatedBy", as I saw as a suggestion on Google.

There are two files in my Visual Studio project which I have not edited: host.json and local.settings.json, I can´t find information about how to set them up or if it´s necessary at all.

Can anyone help me?

Several screen shots

2
How to publish this project in azure ?vijay

2 Answers

10
votes

The Connection property of ServiceBusTrigger attribute should refer to a setting name, e.g. ServiceBusConnectionString.

Then, you should put the setting with same name to local.settings.json for local development and to Application settings for Azure.

1
votes

I needed to append this bit to my ServiceBusConnectionString when running locally: ;TransportType=AmqpWebSockets