简体   繁体   中英

Get consumed queue messages using jms

I am new to java and jms API. I Had a small problem where i need to listen to queue and browse the queue messages. But the problem is before i browse the messages the queue get consumed. do we have any possible way to get the consumed queue messages.

i tried browsing the messages using queuebrowser. but i couldnt solve

I Mean i need to browse for the messages once the queue is consumed. i couldn't find any answers for the past 3 months.. can some one help me as i am new to this java and jms api i couldn't solve. Thanks in advance.

If the messages are consumed from the queue they no longer exists anywhere. If you want to do that you need to work with ActiveMQ, with advisory message http://activemq.apache.org/advisory-message.html but the available informations about the message are rudimentary, another solution is to use camel routes on the broker or destinations interceptors http://activemq.apache.org/virtual-destinations.html , mirrored queues http://activemq.apache.org/mirrored-queues.html to copy messages from a queue/topic to another queue/topic and treat them when you want. Or simply use topic in place if possible.

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