Browse, read, and remove a message from a queue using IBM MQ classes

前端 未结 2 1223
青春惊慌失措
青春惊慌失措 2020-12-18 00:21

I\'m writing a simple Java application using MQ classes for Java with Eclipse.

Right now I\'m able to browse a remote queue without removing the messages stored.

2条回答
  •  长情又很酷
    2020-12-18 01:20

    Solution:

    Here the solution I'm really looking for:

    // set te cursor to remove the message from the queue
    gmo.options = CMQC.MQGMO_MSG_UNDER_CURSOR;
    queue.get(theMessage, gmo);
    

    these lines have to be inserted in the question code

    I've found it here: http://www.velocityreviews.com/forums/t124676-mq-series-messages-browse-and-delete.html

提交回复
热议问题