简体   繁体   中英

MQ Message in a Web Cluster

We want to recive a MQ message in our web app to store in the DB, we are in a cluster with two node's and we want to avoid read this message two times, this is why we think in MQ.

My question here.. if appear one message and it's readed for one node of the cluster, can be possible the second node read this message?

I'm a newbie with JMS, It's a good practice our idea or there is another better way to implement this properly?

If you send a message into a queue, and that queue has two consumers, the message will only be received by one consumer. This is called point-to-point messaging.

If you want the message to be received by both consumers, send it over a topic. This is called publish-subscribe messaging.

See Basic JMS API Concepts for more details.

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