Author |
Message
|
guest468 |
Posted: Sun Feb 18, 2007 9:30 pm Post subject: Message order change |
|
|
Centurion
Joined: 30 May 2006 Posts: 146 Location: NY
|
Hi,
I would like to know if it is possible to put all the messages from one queue to another queue in a way such that the moved messages will be the first ones in the queue (without changing the message priority but the copied messages should appear first in the queue FIFO order.
If so would be great if this can be done using MA01 (Q program)
Thanks. |
|
Back to top |
|
 |
jefflowrey |
Posted: Sun Feb 18, 2007 10:28 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Only if the queue is empty. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
ashu |
Posted: Sun Feb 18, 2007 11:03 pm Post subject: Re: Message order change |
|
|
 Centurion
Joined: 11 Nov 2006 Posts: 132
|
guest468 wrote: |
Hi,
I would like to know if it is possible to put all the messages from one queue to another queue in a way such that the moved messages will be the first ones in the queue (without changing the message priority but the copied messages should appear first in the queue FIFO order.
If so would be great if this can be done using MA01 (Q program)
Thanks. |
Legally it should not be possible...it totally defies the behaviour of Queue as a Data Structure...ofcourse if the Queues in MQ are conceptualized after the Queue Data Structure...
...they should have used Stack instead...  |
|
Back to top |
|
 |
guest468 |
Posted: Mon Feb 19, 2007 5:25 am Post subject: |
|
|
Centurion
Joined: 30 May 2006 Posts: 146 Location: NY
|
Thanks Jeff, I get your point.
But can it be implemented by changing the priority of the copied messages to a higher value?
Thanks |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Feb 19, 2007 5:35 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The order on the queue will be the same no matter what the priority of messages is.
The order in which messages are retrieved by an application MAY be different.
The q program, and many other tools, can save the current set of messages on a queue to a file or move them to another queue. At that point, a queue would be empty. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
guest468 |
Posted: Mon Feb 19, 2007 6:01 am Post subject: |
|
|
Centurion
Joined: 30 May 2006 Posts: 146 Location: NY
|
Jeff,
Basically what I am trying to do is moving messages from Q1 to Q2. But since I have to preserve the message order I would have to move messages from Q2 to Q3 temoporarily before moving Q1 to Q2. Which is then followed by moving of messages from Q3 to Q2. But the problem I am anticipating is what if during this time, new messages come to Q2. The sequence would have lost.
PS:And for variety of reasons we can not eliminate the message afanity.
Any help is appreciated.
Thanks. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Feb 19, 2007 6:07 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You'll have to prevent new messages from coming in.
I assume that this is a one-time thing, a temporary fix for a temporary situation. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
guest468 |
Posted: Mon Feb 19, 2007 6:25 am Post subject: |
|
|
Centurion
Joined: 30 May 2006 Posts: 146 Location: NY
|
Jeff,
I am not sure how I can stop new messages from arriving on the input queue and using what tool? (One that I am aware of is get-inhibit but that would result in new messages being routed to Dead queue)
Thanks |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Feb 19, 2007 6:43 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
If the applications sending messages are talking to remote queue managers, you can stop the receiver channels.
If the applications are not remote, you can stop the applications. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
guest468 |
Posted: Mon Feb 19, 2007 6:46 am Post subject: |
|
|
Centurion
Joined: 30 May 2006 Posts: 146 Location: NY
|
Jeff, It's coming from remote qmgr. But is it possible to stop the receiver channel programmatically using some tool? |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Feb 19, 2007 6:52 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You should not have to do this programmatically.
You should not have to do this more than once.
You can use PCF messages to control channels. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|