I have multiple Azure service bus queues to write to. I must use output bindings. But this output binding cannot be returned to the function endpoints because of the way that the code is structured.
I have this class:
public class OutputBindings
{
[ServiceBusOutput("%Queue1%", Connection = "ConnnectionString1")]
public string Queue1 { get; set; }
[ServiceBusOutput("%Queue2%", Connection = "ConnnectionString2")]
public string Queue2 { get; set; }
}
that is in this Function App endpoint:
[Function("FunctionName")]
public async Task Run([ServiceBusTrigger("%TriggerQueue%", Connection = "ConnectionString")] string message)
{
OutputBindings ob = new OutputBindings()
{
Queue1 = message,
Queue2 = message
};
// do other stuff
{
This is a really dumbed down pseudocode of this. I cannot return the OutputBindings class. I need the messages to propagate to the two other queues the moment that they are set. Thanks.