简体   繁体   中英

load distributon between various jms provider instances

Producers <--> Consumer

In the above scenario there are lets say 'N' number of producers trying to put a lot of messages in our (Consumer's) JMS queues.

My question is how does the load distribution work in the JMS environments specifically with queues.

I think the JNDI provides sufficient indirection in this case, so all the clients are just looking up some JNDI based queue and connection factory. And any kind of loadDistributor could sit in the between the consumer and the producer to take the incoming messages.

how does it distribute those incoming messages to a farm of JMS providers ( i think we need a farm of them to handle the incoming traffic) but then how do you maintain the synchronized copies of multiple queues.. or do you let any message go into any queue and just process it using MDBs. but how do you guarantee that the 'messages will be processed in the order in which they are received" coz they are all distributed in a bunch of queues...

What is the recommended approach for this kind of 'high-load' environments ?

A queue is 'serial' in nature in a way that the messages in it will each be delivered to one receiver. So if you have eg 2 MBDs listening on the queue, they will each take a message in turn work on it and then get the next one.

For incoming messages, you just put them into the queue one after each other.

I may not completely understand what you are looking into, but it looks at first hand, that you need one JMS provider ("messaging hub") that exposes one queue where multiple MDBs (which can live on different hosts) will pick the messages from.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM