I’m trying to understand the shiny, new Reliable Delivery (Sharding). I’m not sure if I understand it correctly and therefore I’m not sure if it is a good choice for the problem I’m facing.
Let me describe the problem.
The messages from a queue (RabbitMQ) should be reliably and efficiently (concurrently) delivered to a remote domain service via an asynchronous gateway . Each message is associated with a domain Entity. Messages for the same Entity must be processed by the domain service in the same order they where placed in the queue. Once the response from the domain service is received, the message is acknowledged in the queue.
Alpakka AMQP will be used to stream messages from the RabbitMQ. Initially I thought Stream.groupBy would be efficient enough but then I realized that the whole processing can be blocked if the delivery of messages to a particular group/shard of entities is delayed.
Reliable Delivery with Sharding seems to be much better solution for the problem described above. Please advise.