简体   繁体   中英

ActiveMQ: Guaranteed delivery of messages to consumer

I'm using ActiveMQ broker with Mule. There are multiple application which are interested in certain type of message and each application has their own dedicated queue. I want to ensure guaranteed delivery of the message to the consumer. There is rest service (GET) which acts as Consumer service and delivers the message to the caller.

In my case, guaranteed delivery means consumer could pick up the message from queue and handle it successfully at their end. To implement this, i'm expecting consumer to send acknowledgment back and after receiving the acknowledgement, i should remove the message from queue. Does this make sense or is there any better approach ? How to implement this ?

Guaranteed delivery is achieved through any of the transactional features of ActiveMQ. You should use any of the protocols that supports guaranteed delivery to consume messages from the broker. Here is a list of protocols/documentation .

The obvious choice is OpenWire ( NMS API / JMS API ), but you do guranteed delivery with STOMP or AMQP as well. Avoid rest for that purpose.

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