|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Copying the specified number of messages in Queues |
« View previous topic :: View next topic » |
Author |
Message
|
VijayGoparaju` |
Posted: Mon Sep 01, 2008 12:55 am Post subject: Copying the specified number of messages in Queues |
|
|
Acolyte
Joined: 26 Aug 2008 Posts: 72
|
Hi All,
I want to Copy a specified number of messages from Source Queue to Destination Queue, and i have opened the first Queue as:
queue = queueManager.AccessQueue(txtQueue1.Text, MQC.MQOO_INQUIRE | MQC.MQOO_FAIL_IF_QUIESCING | MQC.MQOO_BROWSE );
and Second Queue as:
queue = queueManager.AccessQueue(txtQueue2.Text, MQC.MQOO_OUTPUT | MQC.MQOO_FAIL_IF_QUIESCING );
I have used:
queueMessage.MessageId = MQC.MQMI_NONE;
queueMessage.CorrelationId =MQC.MQCI_NONE;
queueGetMessageOptions.Options = MQC.MQGMO_MSG_UNDER_CURSOR; queue.Get(queueMessage, queueGetMessageOptions);
But I am getting only First message repeting but not getting the Remaining messages.I think the Cursor has struck at first message please tell me how to move the Cursor Postion to next record and process all messages.
Thanks,
Vijay.
VijayGoparaju is offline Reply With Quote |
|
Back to top |
|
 |
Mr Butcher |
Posted: Mon Sep 01, 2008 1:19 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
there are browse and browse-next options for the mqget. _________________ Regards, Butcher |
|
Back to top |
|
 |
VijayGoparaju` |
Posted: Mon Sep 01, 2008 11:57 pm Post subject: |
|
|
Acolyte
Joined: 26 Aug 2008 Posts: 72
|
I have tried by putting them also,But didnt get the output...I am always getting the First message...  |
|
Back to top |
|
 |
zpat |
Posted: Tue Sep 02, 2008 12:51 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Use MQGMO_BROWSE_NEXT on each MQGET
No need for message under cursor stuff, no need for INQUIRE option either & no need for browse first.
BTW - if you re-open the queue each time you will always get the first message each time! |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|