简体   繁体   中英

Is it possible to remove a message from the MQ Queue without retriving it or clearing the queue?

我需要从MQ队列中清除一组消息,但是我需要在不重新发送消息或清除整个队列的情况下执行此操作?

Yes, you should be able to use a QueueBrowser for this. The documentation says:

A client uses a QueueBrowser object to look at messages on a queue without removing them.

Here's a tutorial on how to use it for websphere-mq. Here's a tutorial on how to use it using just JMS.

No, you can't remove/clear a message from a queue without retrieving it. A QueueBrowser is used to browse messages from a queue. It does not remove/clear messages from a queue.

There is one more option. You can use tool,that is called RFH Util. With this tool you can remove messages, copy queue, etc. You can download it from here: ftp://ftp.software.ibm.com/software/integration/support/supportpacs/individual/ih03.zip

Using RFHUtil also, you cant delete particular messages in queue.

You have option to purge queue, which will delete all messages in Queue.

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