简体   繁体   中英

Activemq (JMS) with multiple tomcats

Is it possible to produce a JMS event that will be consumed in a specific tomcat node? We are facing a problem that in our cluster of 3 tomcats - an event is thrown from one of the tomcats and is actually consumed by a different node even though we would like it to stick to the same tomcat (original)

So, you share a broker between your Tomcat instances?

Fine, use separate topics/queues for each instance, maybe a prefix would be the easiest way.

You can also send the tomcat instance ID (or what have you) as a JMS String property with each message. Then on the consumer, you consume with a selector that filter the message based on the instance Id.

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