Support triggering a single function on multiple queues (wildcard queue name)
See original GitHub issueExample scenario: A webjob that monitors all *-poison queues in a storage account, with a single generic action taken on all (e.g. write queue message to blob for inspection, email/Slack/SMS to ops team to alert of failure).
I’ve looked into implementing this as an extension, but rapidly ended up with 90% of the code being duplication of the core SDK due to much of the infrastructure behind QueueTriggerAttribute being marked as internal.
Would you be willing to consider a pull request that creates a MultipleQueueTriggerAttribute that accepts a regex to match against queue names, creates a listener monitoring all matching queues and adds a queueName binding in addition to the existing bindings?
public static void HandlePoisonQueues(
[MultipleQueueTriggerAttribute(".*-poison")] string message,
string queueName,
[Blob("poison/{queueName}/{id}.txt")] TextWriter blob,
TextWriter logger)
{
logger.WriteLine($"Poison message received on {queueName}")
blob.Write(message);
}
Issue Analytics
- State:
- Created 7 years ago
- Reactions:31
- Comments:15
Top Results From Across the Web
Is it possible to create a queue triggered azure function ...
By default: no you cannot. You can, however, have multiple functions in the same class all trigger on different queuenames, but call the...
Read more >Two different Service Bus queue trigger function apps with ...
Hi, I have two service bus queue triggers function apps with same service bus name and queue details, but pointing to different destinations....
Read more >Chapter 4. Addresses, Queues, and Topics Red Hat AMQ 7.4
A queue is associated with an address. There can be multiple queues per address. Once an incoming message is matched to an address,...
Read more >Azure Queue storage trigger for Azure Functions
Use the queue trigger to start a function when a new item is received on a queue. The queue message is provided as...
Read more >Part 4: RabbitMQ Exchanges, routing keys and bindings
An exchange is responsible for routing the messages to different queues with the help of header attributes, bindings, and routing keys.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Has anyone from Microsoft had a look at this, and is it on the backlog?
For massive scale and better tenancy isolation, 1 queue per tenant would be ideal - but that would also require one function binding per queue too, which is far from ideal (and likely to hit some scaling limitation, which are rife throughout all Azure services)
Bueller? At 5 years and ticking, this would be nice to have.