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

前端 未结 2 1219
青春惊慌失措
青春惊慌失措 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

    0 讨论(0)
  • 2020-12-18 01:25

    To delete a message, follow the procedure described in the MQ documentation.

    For deprecated constant values, check again the Javadoc, the recommended way is described.

    MQC.MQOO_INPUT_SHARED --> CMQC.MQOO_INPUT_SHARED
    
    0 讨论(0)
提交回复
热议问题