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 » Overriding MQ MSGID with the qm generated one

Post new topic  Reply to topic
 Overriding MQ MSGID with the qm generated one « View previous topic :: View next topic » 
Author Message
danhoffman
PostPosted: Wed Jan 09, 2008 1:42 pm    Post subject: Overriding MQ MSGID with the qm generated one Reply with quote

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
View user's profile Send private message
PeterPotkay
PostPosted: Wed Jan 09, 2008 1:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
danhoffman
PostPosted: Wed Jan 09, 2008 2:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
PeterPotkay
PostPosted: Wed Jan 09, 2008 2:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
danhoffman
PostPosted: Wed Jan 09, 2008 2:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Wed Jan 09, 2008 2:20 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
danhoffman
PostPosted: Wed Jan 09, 2008 2:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
EddieA
PostPosted: Fri Jan 11, 2008 10:30 am    Post subject: Re: Overriding MQ MSGID with the qm generated one Reply with quote

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
View user's profile Send private message
tleichen
PostPosted: Fri Jan 11, 2008 10:42 am    Post subject: Reply with quote

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
View user's profile Send private message
danhoffman
PostPosted: Fri Jan 11, 2008 5:31 pm    Post subject: Reply with quote

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
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 » Overriding MQ MSGID with the qm generated one
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.