Author |
Message
|
danhoffman |
Posted: Wed Jan 09, 2008 1:42 pm Post subject: Overriding MQ MSGID with the qm generated one |
|
|
Apprentice
Joined: 03 Nov 2005 Posts: 25
|
There is an external application who is feeding us messages and populating the msgid in their put call. Unfortunately, they are populating it with something that is not guaranteed to be unique, and our code expects the msgid to be unique for duplicate detection, etc. Note that what they are populating it with is not important and does not need to be retained.
Ideally, we want it to be generated by the QM (ie MQMI_NONE)
Is there a way (using just mq itself and hopefully not having to write an exit, etc.) to have the msg id replaced by the queue manager despite what they put there? |
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed Jan 09, 2008 1:48 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
A. Get the message and immediatly reput it to another queue without their lousy Message ID. Your QM will generate a new one. Get the message agaon from your intermediate q and proceed.
-or-
B. Exit (Msg or API)
-or-
C. Get them to fix their code. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
danhoffman |
Posted: Wed Jan 09, 2008 2:06 pm Post subject: |
|
|
Apprentice
Joined: 03 Nov 2005 Posts: 25
|
PeterPotkay wrote: |
A. Get the message and immediatly reput it to another queue without their lousy Message ID. Your QM will generate a new one. Get the message agaon from your intermediate q and proceed.
|
I'm assuming the above requires an exit? If not, how does that differe from 'B'? |
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed Jan 09, 2008 2:08 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Choice "A" is a plain old MQ app. It can even be your main app if you want to add that extra step into it. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
danhoffman |
Posted: Wed Jan 09, 2008 2:12 pm Post subject: |
|
|
Apprentice
Joined: 03 Nov 2005 Posts: 25
|
ok - got it. A won't work because A's failure recovery relies on the msg id to be unique.
Is there any way that the queue manager itself can do this? (Via configuration - ie special type of queue setup - namelists, distribution lists, etc. - just throwing out stuff), etc. so that no code needs to be written? |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jan 09, 2008 2:20 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
If you cannot change the sending app you'll need to write a little app that gets the messages from Q A clearing the msg Id so that you get a new one... generated by the qmgr and puts them to Q B.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
danhoffman |
Posted: Wed Jan 09, 2008 2:22 pm Post subject: |
|
|
Apprentice
Joined: 03 Nov 2005 Posts: 25
|
fjb_saper wrote: |
If you cannot change the sending app you'll need to write a little app that gets the messages from Q A clearing the msg Id so that you get a new one... generated by the qmgr and puts them to Q B.  |
I figured. was hoping there was a way the qm could do it for me (even if using multiple queues) |
|
Back to top |
|
 |
EddieA |
Posted: Fri Jan 11, 2008 10:30 am Post subject: Re: Overriding MQ MSGID with the qm generated one |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
danhoffman wrote: |
Unfortunately, they are populating it with something that is not guaranteed to be unique, and our code expects the msgid to be unique for duplicate detection, etc. |
Turn off your "duplicate detection" code. It's not going to add any value, after you've generated unique IDs immediately before checking them.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
tleichen |
Posted: Fri Jan 11, 2008 10:42 am Post subject: |
|
|
Yatiri
Joined: 11 Apr 2005 Posts: 663 Location: Center of the USA
|
Awful lot of bantering for such a simple thing. Get them to change their app and be done with it!  _________________ IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer |
|
Back to top |
|
 |
danhoffman |
Posted: Fri Jan 11, 2008 5:31 pm Post subject: |
|
|
Apprentice
Joined: 03 Nov 2005 Posts: 25
|
tleichen wrote: |
Awful lot of bantering for such a simple thing. Get them to change their app and be done with it!  |
Unfortunately, when different banks are sending messages to each other, sometimes it's not that easy... |
|
Back to top |
|
 |
|