1
votes

For starters, I'm using Visual Studio, not the Azure Functions portal. I found documentation that covers creating a queue output binding using the portal but can't find a way to apply this to plain old C# code.

I have a trigger wired up and functioning as-designed. Now, I want to add a message (string) to queue storage. How do I add the queue output binding and wire it up to the correct queue using C# in Visual Studio 2017.3?

1

1 Answers

1
votes

Similar to what you did in the scripts, but decorate it with Queue attribute, for instance

[return: Queue("MyQueue")]
public static string Run([TimerTrigger("0 */1 * * * *")] TimerInfo myTimer)

or

public static string Run([TimerTrigger("0 */1 * * * *")] TimerInfo myTimer, 
    [Queue("MyQueue")] out MyMessage message)