Is it possible to trigger the same azure function from multiple service bus triggers?
So the scenario I have is that I have two separate service buses that are for all intents and purposes sending the same message just from different sources. I want to know if it is possible to have a single azure function subcribe to both buses.
Some akin to:
public class TheFunction
{
public static async Task Run(
[ServiceBusTrigger("%TopicNameA%", "%SubscriptionNameA%", Connection = "Default")]
[ServiceBusTrigger("%TopicNameB%", "%SubscriptionNameB%", Connection = "Default")] SomeEventData event, ILogger log)
{
// do some shenanigans
}
}
Now I am aware that above isn't possible, but I hope it conveys the general idea of what I would like to achieve.
My fallback is just to have two separate but identical functions where each subscribes to one of the buses and just throws the event to some shared service that does the work.
NOTE: I am unable to send messages from different sources to the same bus. Not impossible, just not feasible to re-jig things within the given timeframe.
question from:
https://stackoverflow.com/questions/65837519/single-azure-function-triggered-by-multiple-buses 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…