开发者

load distributon between various jms provider instances

开发者 https://www.devze.com 2023-02-25 10:18 出处:网络
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.

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 distribut开发者_开发知识库ed 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 e.g 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消