Author |
Message
|
Yuvaraj |
Posted: Wed Jan 21, 2004 4:43 pm Post subject: Backing up a message in the queue |
|
|
Apprentice
Joined: 28 Oct 2003 Posts: 30
|
Hi
I have got a situation wherein I need to back-up or take a copy of the message in the queue into a file (or another queue) before another application (which is continuously polling this queue) gets the message.
For example, say queue1 is the input queue and App1 is the application polling this queue continuously. My requirement is if data is put into queue1, the data/message needs to copied before App1 gets the message from queue1.
Does MQ inherently provide any feature to take a copy of the message before an application polling the queue picks the message? Or is there any other way to achieve the same?
Thanks & Regards
Yuvaraj |
|
Back to top |
|
 |
EddieA |
Posted: Wed Jan 21, 2004 5:41 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
There is nothing built in to MQ to do this.
You could direct the messages to a second Queue and then run an application that saves the message before putting it on the the 'original' queue.
Also, is the app really polling. That isn't the best way to do it in MQ. You should use GET wit WAIT.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
RogerLacroix |
Posted: Wed Jan 21, 2004 9:33 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi,
As Eddie states, there is no native support for that feature. Some time ago I wrote a program to do what you are looking for. It is called MMX (Message Multiplexer). It will move messages from a source queue to "n" target queues (up to 99).
You can download MMX (including the C source code) at:
http://www.capitalware.biz/sample_mqseries.html#ccode
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
Carla Viragh |
Posted: Thu Jan 22, 2004 4:06 am Post subject: |
|
|
 Voyager
Joined: 31 Oct 2003 Posts: 92 Location: São Paulo - Brasil
|
Your main application can do that... You should insert a procedure to make a copy of all messages the app is getting. _________________ Carla Viragh |
|
Back to top |
|
 |
RogerLacroix |
Posted: Thu Jan 22, 2004 8:15 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Carla were you referring to MQ Visual Edit? If true, yes, it can do it too (and very well I might add ). But I got the impression that Yuvaraj wanted a "batch" or 7/24 hands off solution. Hence, that is why I suggested using MMX.
Regards,
Roger Lacroix _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jan 22, 2004 8:24 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
RogerLacroix wrote: |
Carla were you referring to MQ Visual Edit? |
I think she meant the OP's main application. It could perhaps create a distribution list from a properties file, and then push the message to all queues with one put statement.
That's how I'd do it. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Yuvaraj |
Posted: Thu Jan 22, 2004 8:38 am Post subject: |
|
|
Apprentice
Joined: 28 Oct 2003 Posts: 30
|
Hi All
Sorry for not having given the complete picture initially itself. Actually the scenario is like this
An application is putting a message into a queue, which is being polled by a WMQI message flow. I want to take a copy of the message (either into a file or into another queue) before the message is picked by the flow.
Saying this, I don't want to touch the application and making it to put in two separate queues and neither do I want to do that in my message flow. That was the reason why I was looking out for any property at MQ Series level.
Now even if I am not able to take a copy of the message but if MQSeries maintains a log or trace file from which I can get back the message, its more than enough for me.
Can anyone let me know if this is possible?
Can someone also tell me the pros n cons if I go for Trigger or API Exits for this scenario? Whether this is achievable by these?
Thanks & Regards
Yuvaraj |
|
Back to top |
|
 |
RogerLacroix |
Posted: Thu Jan 22, 2004 9:38 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Ok,
Then you have 3 choices as I see it.
(1) Use MMX.
(2) Write a message exit or API exit but this is probably over kill.
(3) Purchase a product like ReQuest by Cressida ($$$$$). It can extract messages from the MQ log. (Some guy has been spamming mqseries.net about it today, so he'll probably post something here.)
Regards,
Roger Lacroix _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
|