Has any one setup a 'message grouping' (re ActiveMQ) scenario with Solace.
E.g. consider a large number of messages (orders for example), each order has a unique order id. Amendments/changes to orders have the same order id. I want to use round-robin dispatching for different order ids, but need to ensure messages for the same order id are processed 'in order'.
Message Groups specifically solve this problem, but I can't see how to implement the same in Solace.
-- additional context
I'm looking at use a topic structure like: TOPIC/orders/ , which gives me the groups. And then subscribing via TOPIC/orders/* ...
From the docs it appears as if all the components are available: Grouping via topic name, guaranteed messages, application acknowledgments, round robin dispatching via non-exclusive queues... but I don't see a specific example that show how to bring these together to solve the 'message groups' problem.
Thanks.
On a Solace appliance/VMR, JMSXGroupID
can be written/read by applications but it has no impact on message delivery.
Here are two commonly used options that to simulate the behavior of ActiveMQ's JMSXGroupID
.
Use multiple exclusive queues and hash the orders across them according to their topics.
Use a request-reply model.
a) Establish a well-know topic for initial orders - TOPIC/INITIAL
b) Create a non-exclusive queue - INITIAL_QUEUE
that is configured to receive all messages sent to TOPIC/INITIAL
c) Publishers that have no destination for a new communication will send the first message to TOPIC/INITIAL
.
This load-balances the initial messages to multiple consumers.
d) When the message is processed by a consumer, the consumer sends a reply to the publisher with another known topic/queue for further order updates to be processed by the same consumer. The publisher will then send further updates to this destination to ensure that all messages are sent to the same consumer. This can be easily handled by the Solace API, via features such as reply-to destinations and peer to peer inbox topics.