This operation returns an available message from a specified queue and removes the message from the queue. The queue can belong to a local or remote MQe queue manager, but cannot be an asynchronous remote queue.
If you do not specify a filter, the first available message is returned. If you do specify a filter, the first available message that matches the filter is returned. Including a valid lockID in the message filter allows you to get messages that have been locked by a previous browse operation. If no message is available, the get operation returns an error.
Using assured message delivery depends on the value of the confirmID parameter. Passing a non-zero value returns the message as normal. However, the message is locked and is not removed from the target queue until it receives a subsequent confirm. You can issue a confirm using the confirmGetMessage() method. However, message delivery is not assured. Refer to Message delivery, for more information on assured and non-assured message delivery.