here is a simplified / schematic topology we set up
[Front server 1 (message producer)] [Front server n (message producer)]
| |
|________________ ________________|
| |
[Messaging Server (HornetQ)]
| |
________________| |________________
| |
[Task server 1 (Message Driven Bean)] [Task server n (MDB)]
- Each node (server) is a standalone (no cluster) jboss application server (Jboss-as7) including the messaging one.
- The messaging server deploys many JMS queues.
- Each Task server deploys a MDB per queue with many consumers.
- All message producers use the same inbound adapter, all message consumers (MDBs) the same outbound one. In fact all front node are exactly the same (same AS, same config, same deployed artifacts), same for all server nodes.
Now here is my problem :
the application is a multi-tenant one, for a given queue, some tasks (message processing) must not be processed in parallel for a given tenant, we set up so message grouping to handle this constraint. The message group is the tenant name and is set by the message producer when sending the message :
message.setStringProperty("JMSXGroupID", tenantName);
On a platform we have 1000+ tenant (so 1000+ different message groups) and for a given queue 3 consumers per server and 3 tasks servers.
When monitoring this queue on the messaging server we can so see thousands messages in queue and 9 consumers. We expects message to be delivered 9 by 9 but in practice the in-delivery message count never exceed 1.
What's the problem here ? is the topology suitable for our needs ?