Contents

Let's say there is an order processing grid on 10 nodes, each of which needs to load customer account data into a cache. Each node can hold 10% of the customer data. Every node subscribes to the "ORDERS" queue at the broker. When the producer to the ORDERS queue produces a message, it sets the customer ID in the JMSXGroupID header. If the broker sees that this ID is unallocated, it selects a consumer from the 10 on the queue and delivers the message to it. Now ALL future messages with that ID will go to the same consumer which means it goes to the consumer with that account in its cache. This happens forever unless the consumer goes away. In that event, the broker will select a new consumer from the available ones the next time that account ID is seen in the JMSXGroupID header and that consumer will have to load the account data into cache.

Adaptavist ThemeBuilder EngineAtlassian Confluence