0
votes

Currently we have a legacy system (.net framework library) where a message is queued in service bus queue. There is windows service, which has multiple message handlers (custom classes for processing a message). We have a logic to split the message from queue into these message handlers. Ratio of split is 90% and 10% into these message handlers.

We are planning to migrate this legacy system into azure function/durable function, where we could have a queue trigger to process a message. We could have multiple azure functions, one for each message handler in legacy system. Challenge we face is how do we handle splitting of messages into these azure function?

For e.g.: Azure-Function-1 should take 90% of the queue message, Azure-Function-2 should take 10% of the queue message.

My question is does azure has out-of-the-box solution for handling messages in such a scenario? Is there any other better solution than Azure functions/durable functions?

1
Just thinking out loud, can you not auto forward the messages to a topic and then split them in Subscriptions based on the message type and have your Azure Function listen to those Subscriptions?Gaurav Mantri
We do not have anything unique in message which will distinguish what handler to be used. So we cannot go based on a message.Madhukar Hiriadka

1 Answers

0
votes

This not how it works. The number of functions is determined by the number of events. So if your Azure-Function-1 has more messages then Azure-function-2, changes are it will have more copies of your function in execution.

If you have very large number of messages, maybe you could switch to Event Hubs where you can determine (only in advance) the number of partitions and Throughput Units.