Reputation: 4209
I am building a integration module between multiple platforms, each needs to send and receive integration messages. I would like to have a simple service bus architecture, so instead of having 6 queues (3 systems, out/in for each). I would like to have a single "output" queue and a single "input" queue.
On each queue i would then put messages with specific data types (e.g. the content could be: "output.crm" meaning that this is the output for the crm system.). I have several Azure functions listening to this queue, but i want only some specific functions to actually process the message - the functions that know how to handle an "output.crm" message.
That is - im trying to implement a "selective consumer" type of pattern on this. Is this even possible with Azure functions?
Upvotes: 1
Views: 2007
Reputation: 8265
Another option to the Service Bus Topic answered by Mikhail is to use an Azure Event Grid Pub/Sub model.
The AEG is an eventing model where a custom publisher (http client) sent the event message to the custom topic endpoint and the AEG notification manager will distribute it to all subscribers based on their subscriptions. There is an EventGridTrigger function as a AEG subscriber.
Note, that this model is a push model, so there is no need any listener for pull-up the message.
The AEG limits are:
Upvotes: 1
Reputation: 523
What is the use of making separate functions listening to the same Queue?. As far as I know, it is not a good idea to listen the same queue by multiple listener.(There is a concept of queue partitioning but I am not that much familiar with it).
If you anyhow want to listen the same queue with multiple Servicebus listener then you can use the conditions and then abandon the message if conditions doesn't match. If you want this way of abandoning the message then I may help you out.
Note It is good to separate the responsibility by making the individual Azure function (Servicebus listener) to individual queue otherwise you may choose to use topic.
Upvotes: 0
Reputation: 35144
It looks like Service Bus Topic & Subscriptions could help you:
Upvotes: 3