Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Azure Functions v2 .NET Core DEMO

02-bindings-demo - output-demo

This example is about how to use output bindings - Function ServiceBusOutputBindingFunction listens on HTTP request and as result writes to ServiceBus queue.

Everything important happens in Function argument definition:

             Connection = "dotnettalks-servicebus-playground_SERVICEBUS", 
             EntityType = EntityType.Queue)] 
             ICollector<string> outputSbQueue,

First parameter with value items-to-process defines queue name in ServiceBus.

Connection parameter represents connection string to ServiceBus.

Important - this parameter is not directly value with connection string, but it is key for JSON in local.settings.json. So you have to create corresponding value in local.settings.json:


    "dotnettalks-servicebus-playground_SERVICEBUS": "----YOUR-CONNECTION-STRING----",


There is example in local.settings.json.template file.