Author |
Message
|
kash3338 |
Posted: Thu May 21, 2009 12:36 am Post subject: Using MQGet to empty a queue |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
Hi,
As per a requirement, I have to empty a queue, that is place all the messages from one queue to other using a MQGet node. How do i acheive this?
How do i read all the messages through MQGet and place it in other queue? The expected number of messages in queue would be around 20,000. |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Thu May 21, 2009 12:41 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
MQInput node connected directly to an MQoutput node?
Exactly why you want to do this I dont know though. |
|
Back to top |
|
 |
Vitor |
Posted: Thu May 21, 2009 12:46 am Post subject: Re: Using MQGet to empty a queue |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kash3338 wrote: |
As per a requirement, I have to empty a queue, that is place all the messages from one queue to other using a MQGet node. |
Why a MQGet node not an MQInput? Why a WMB flow not an external tool? Is this a one off or a regular opperation? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
francoisvdm |
Posted: Thu May 21, 2009 4:55 am Post subject: |
|
|
Partisan
Joined: 09 Aug 2001 Posts: 332
|
If you do decide to do it with MQGet...watch out for the stack overflow error, search forum for examples on how to avoid it.
If you must do it with broker flow... consider MQInput -> MQOutput and only start the flow when you need it to be done. _________________ If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.
Francois van der Merwe |
|
Back to top |
|
 |
francoisvdm |
Posted: Thu May 21, 2009 9:37 pm Post subject: |
|
|
Partisan
Joined: 09 Aug 2001 Posts: 332
|
What about sending a 'MQCMD_CLEAR_Q" command to the queue manager? .... I think that will be the most efficient. _________________ If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.
Francois van der Merwe |
|
Back to top |
|
 |
AkankshA |
Posted: Thu May 21, 2009 9:47 pm Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
francoisvdm wrote: |
What about sending a 'MQCMD_CLEAR_Q" command to the queue manager? .... I think that will be the most efficient. |
while using this make sure your queue is not open by any other application... neither for input nor for output...... _________________ Cheers |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri May 22, 2009 9:46 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
francoisvdm wrote: |
What about sending a 'MQCMD_CLEAR_Q" command to the queue manager? .... I think that will be the most efficient. |
er ... Francois, the requirement was not to empty/clear the queue but to move the messages from queue A to queue B.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
francoisvdm |
Posted: Fri May 22, 2009 9:04 pm Post subject: |
|
|
Partisan
Joined: 09 Aug 2001 Posts: 332
|
oops, yes....sorry, the subject line a little confusing for the "older male"  _________________ If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.
Francois van der Merwe |
|
Back to top |
|
 |
|