0
votes

I follow the following tutorial to add messages to a queue using Azure Functions.

https://docs.microsoft.com/en-us/azure/azure-functions/functions-integrate-storage-queue-output-binding#add-code-that-uses-the-output-binding

It worked fine when I used Azure web portal to create the function. Now I am using Visual Studio. I am confused how to add queue parameter to my function definition.

[FunctionName("PublishMessage")]
public static IActionResult Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)]HttpRequest req,
    <<<<<<<<<<<<TODO: What to add here>>>>>>>>>>> ICollector<string> outputQueueItem,
    TraceWriter log)
{
    log.Info("C# HTTP trigger function processed a request.");

Here are tha parameters from function.json file (which i need to add to my function),

{
  "type": "queue",
  "name": "outputQueueItem",
  "queueName": "outqueue",
  "connection": "AzureWebJobsDashboard",
  "direction": "out"
}
1

1 Answers

1
votes

Should be as simple as

[Queue("outqueue", Connection="AzureWebJobsDashboard")] ICollector<string> outputQueueItem