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 IBM MQ Support » How to change header info of a "in-flight" message

Post new topic  Reply to topic
 How to change header info of a "in-flight" message « View previous topic :: View next topic » 
Author Message
mqdev
PostPosted: Thu Feb 19, 2004 1:53 pm    Post subject: How to change header info of a "in-flight" message Reply with quote

Centurion

Joined: 21 Jan 2003
Posts: 136

Is there any fool-proof way of changing the header info of a message sitting on the xmit queue? This is needed, for example, when you discover that the 100th message on the queue (all msgs have equal priority to begin with) MUST go first to its destination and one way to do this would be to increase its priority. Off course, the default priority of the msgs would be less then MAX priority allowed for this to work - assuming its feasible and safe to change the header info of "in-flight" msgs.
We know that some products live MQVisualEdit have this capability - but we are looking for an API way of doing this - like execute a program which will look into all the msgs currently on a certain xmit queue and change the header info for a subset of msgs which are selected based on some crieteria.
It is acceptable to briefly stop the channels while we are making the changes [so that we dont yank out a msg that MQ is actively transmitting...]
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Thu Feb 19, 2004 2:34 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Hi,

As the author of MQ Visual Edit, I can tell you it is definitely possible and relatively easy to do. There is no API to do this. Just do the following 10 steps:
- Stop the channel and the set the GET(ENABLED) of the XMITQ
- Open (1) the XMITQ for input with "SAVE ALL CONTEXT"
- Open (2) the XMITQ for output with "SET ALL CONTEXT"
- Do a GET under SYNCPOINT (very important)
- Save the MQMD and data of the message
- Create a new message and copy the old MQMD and data to the new message
- Change the priority
- In the PutMessageOption, set the open handle of (1)
- PUT the message to the XMITQ under SYNCPOINT
- If everything is successful, do MQCMIT

Done. (or you can just use MQ Visual Edit )

Hope that helps.

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
EddieA
PostPosted: Thu Feb 19, 2004 3:28 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
so that we dont yank out a msg that MQ is actively transmitting

Nothing to worry about here. The messages are removed from the XMIT queue under synpoint, so when MQ 'takes' the message to start sending it, your application would no longer see it. If the MCA rolls back the UOW because of a channel error, the message will magically re-appear in the queue.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Thu Feb 19, 2004 3:38 pm    Post subject: Re: How to change header info of a "in-flight" mes Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

mqdev wrote:
but we are looking for an API way of doing this - like execute a program which will look into all the msgs currently on a certain xmit queue and change the header info for a subset of msgs which are selected based on some crieteria.

If you know the criteria of which messages must always go first, why not code the priority in the application that is putting the messages...

Michael
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
mqdev
PostPosted: Fri Feb 20, 2004 6:26 am    Post subject: thanks a ton folks... Reply with quote

Centurion

Joined: 21 Jan 2003
Posts: 136

As always, you are a great community on whom one can rely on for reliable, to-the-point info...thanks Roger..will work on your suggestion. I really appreciate your selflessness in letting out the inner workings of MQVisualEdit....

Micheal - heres is how this situation comes about (certain msg SHOULD get there next situation...). We have a production cluster and dessiminate info from the server nodes to the member nodes. Sometimes, due to Network communication disruption, some member nodes are offline for an extended period of time. After the Network is restored, we have a situation wherein some of the msgs destined to a member node (which are sitting on the xmit queue in the Server node) are urgently needed. This situation is caused solely due to the network outage - and we wouldn't know before hand which are the time-critical ones in the just-restored-Node [user comes and says this file should have been there y'day night and would be used today morning by so-n-so app..but since the Netork was down, my app is waiting now for this file and the world will come to an end if it isnt there within the next 20 mins]...hope that clarifies why we need this solution.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Fri Feb 20, 2004 6:10 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

So are you saying Message100 needs to arrive before 1-99, or are you saying Message100 needs to arrive ASAP?

If 100 needs to get there before 1-99, then you would have had the same problem even if there was no network outage.

If you are saying that 100 needs to get there ASAP, I wouldn't worry about it. Unless these messages are G I G A N T I C, all 100 will delivered in less than a second. And even if they are big, it will take you longer to mess around with stopping channels and changing headers than if you simply let it take care of itself.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Sat Feb 21, 2004 4:46 am    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

yeah,
I always like the analogy of oceanfreight versus airfreight...
send everything "ocean" as it is cheap...
then find out the ship departs late or the customer needs the delivery sooner then planned...
try and find the package either by going to the harbour and search the ship or
get a helicopter, head out to sea, land on the ship, find the package, fly back and put it on the first flight out...

would you do it?

Michael
PS how do you lift a battle-tank in midsea using a helicopter?
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
mqdev
PostPosted: Mon Feb 23, 2004 6:51 am    Post subject: here you go.... Reply with quote

Centurion

Joined: 21 Jan 2003
Posts: 136

Peter -
We want the message#100, #105, #107 to get there ASAP (coz they could be segmented portions of same physical file - for us the unit of xfer is a file which could be large - again we may or not segment -its too long a story as to why it is like that....)
the number of msgs in the Queue is variable - could be 10 (what you said is true in this case) and could be 1 million and some of these could be G I G A N T I C (like you said ). Also regarding the size of the file, it is small as of now - but could become pretty large tomorrow - knowing some of the fanciful things the Managers are talking, its only a matter of time before we get there. So we are trying to do our design with some scalability in mind..

Hey Micheal -we are more advanced then ships and helicopters.....we beam the packages a la StarWars
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Mon Feb 23, 2004 6:55 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

Do some test, mqdev. Time yourself to see how long it takes to accomplish manual intervention, and then see how long MQ takes to do it by itself.

Most time you will probably be better off just letting MQ do its thang. You may find in some cases you are faster.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
mqdev
PostPosted: Mon Feb 23, 2004 6:59 am    Post subject: Gotcha... Reply with quote

Centurion

Joined: 21 Jan 2003
Posts: 136

Peter-
Ours is still in requirements stage...I will definitely keep the point raised by you in mind when it comes to implementation. Thanks for your input folks!

-mqdev
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 IBM MQ Support » How to change header info of a "in-flight" message
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.