I use activeMQ server from:
http://activemq.apache.org/enterprise-integration-patterns.html
I have send some message to QUEUE.
I wondering that are there any way to check existence of specific message on queue in ActiveMQ server without consumer the message?
The best why to check for the existence of a single message would be to use a QueueBrowser with a message selector. There are no guarantees though that the browser will return the message depending on how deep the Queue is.
What you are trying to do is an anti-pattern and you should really consider using a true Database if you need to query for data. JMS Queues are meant to house some data which should be consumed rather quickly, there is a very limited feature set around querying for a reason, this is the job of a database.
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.