简体   繁体   中英

Is there any way i can check that a messags has been published?

I need to check for messages inside a RabbitMQ queue using Java. I have gone through the standard Java API documentation of RabbitMQ but it seems that there is no standard way described there. I have also referred to this but failed to find any standard way.

What I am trying to achieve by this can be summarised as:

  1. My application will publish a message into a fanout exchange.

  2. Now here I want to get the contents of the message that has been published by my application or a confirmation whether the message is published or not into the correct exchange.

How can this be done using Java?

Use publisher confirms, add the message itself to the CorrelationData argument then, when you get a callback with the Ack, you can access the message.

See the documentation .

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