Hi,
My requirement is to read specific number of messages from the queue and post those messages to another queue.
For eg: In QueueA 500 messages are available, I need to read 50 messages at a time and post those 50 messages to another queue i.e QueueB. This needs to be repeated until all the messages are posed to QueueB.

My code is like

MQGetMessageOptions gmo = new MQGetMessageOptions();
gmo.options = MQC.MQGMO_LOGICAL_ORDER | MQC.MQGMO_ALL_MSGS_AVAILABLE;
gmo.matchOptions = MQC.MQMO_NONE;

MQGMO_ALL_MSGS_AVAILABLE is getting all the messages in one instance

Please help.

Thanks in advance
Satya.