ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General Discussion » Copying the specified number of messages in Queues

Post new topic  Reply to topic
 Copying the specified number of messages in Queues « View previous topic :: View next topic » 
Author Message
VijayGoparaju`
PostPosted: Mon Sep 01, 2008 12:55 am    Post subject: Copying the specified number of messages in Queues Reply with quote

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
View user's profile Send private message
Mr Butcher
PostPosted: Mon Sep 01, 2008 1:19 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

there are browse and browse-next options for the mqget.
_________________
Regards, Butcher
Back to top
View user's profile Send private message
VijayGoparaju`
PostPosted: Mon Sep 01, 2008 11:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
zpat
PostPosted: Tue Sep 02, 2008 12:51 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » Copying the specified number of messages in Queues
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.