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 » IBM MQ Java / JMS » Copy message into another queue

Post new topic  Reply to topic
 Copy message into another queue « View previous topic :: View next topic » 
Author Message
bindu
PostPosted: Thu Sep 27, 2007 9:59 pm    Post subject: Copy message into another queue Reply with quote

Voyager

Joined: 07 May 2004
Posts: 97

Hi,
I need to copy the exact message into another queue i.e. from Queue A to Queue B. This needs to happens before the MDB picks up the message from Queue A online. Could any one help me how to do this one because i need to keep copy of all messages that came into Queue A. Instead of this one is there any other way to make a copy of all messages that came to Queue A entire day.

Thanks in advance.

Bindu
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Sep 27, 2007 11:05 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Look up the mirrorq exit.

Note that this is a sample exit, is not intended to be production strength and a problem with an exit can cause all sorts of issues.

You're far better getting whatever's writing into Queue A to write a second copy into Queue B, or get whatever's reading Queue A to write into Queue B or other audit location.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Sep 28, 2007 2:35 am    Post subject: Re: Copy message into another queue Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

bindu wrote:
Hi,
I need to copy the exact message into another queue i.e. from Queue A to Queue B. This needs to happens before the MDB picks up the message from Queue A online. Could any one help me how to do this one because i need to keep copy of all messages that came into Queue A. Instead of this one is there any other way to make a copy of all messages that came to Queue A entire day.

Thanks in advance.

Bindu


The MDB should log the message into a DB. Then you have the exact copy of what was processed. If the sending app does the same after sending the message you can even correlate by messageId and find out if messages where lost in transit (expiration, channel problems on non persistent messages etc...).

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
JuulV
PostPosted: Fri Sep 28, 2007 7:34 am    Post subject: Reply with quote

Apprentice

Joined: 05 Sep 2007
Posts: 28
Location: Belgium

There are a few ways to achieve this:
_ you can have the application write in double, but you probably don't want to go this way
_ you can write an "API wrapper" to do this
_ you can use the API Exit; the sample program "mirrorq" can help you here
_ if the messages are persistent, they're also written to the WMQ recovery log

I know that we shouldn't make any "commercial" statements, but Cressida Technology has products that can help you with using either the API Exit method, or the Recovery log method
_________________
Juul Vanparijs
Senior Developer
Cressida Technology Ltd
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Fri Sep 28, 2007 7:42 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You can also change where the application RECEIVING the message is reading from, and put an app that reads from the original queue, and writes to the new queue and a backout queue.

More straightforward than messing around with mirrorq, and just as transparent to the sending application.

I've never used any Cressida products, so I can't comment on the value of that.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
bindu
PostPosted: Fri Sep 28, 2007 9:12 am    Post subject: Copy message into another queue Reply with quote

Voyager

Joined: 07 May 2004
Posts: 97

Hi All,
Thanks alot for your valueble suggestions. Here actually the application is already in production and client doesnt want to redeploy again means no changes in application side. The mail problem is here MQ is getting messages from different client and MDB is picking those and sending to DB and receiving from response from DB on backend side sometimes it takes more time nearly 30min to get response from backend so in the mean time on MQ side queue A is filling out so they just want to know which message its taking more time and then they will ask the developer to make changes on the front end application team related that particular request. To find out which message get strucked in process i plan to implement this scenario. Could you please let me know is it the right way am i handling the scenario or not. Please post your suggestions based on scenario.

Thanks in Advance,
Bindu
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Sep 28, 2007 7:40 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

This can be handled in a myriad of different ways:
  • By having a timed request / reply process with the left overs being analyzed and handled ...
  • By running a complete asynchronous model... The reply gets send to an MDB that just logs to a DB. If and when the message is needed it gets extracted from the DB...
  • By running any combination of the afore mentioned


Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Sat Sep 29, 2007 5:15 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I'd think it would be easiest to configure the MDB to run multiple instances... so that if one message is causing a delay, then other copies of the MDB can process the messages on the queue...

And, of course, have the MDB log some information about what message it's trying to process, so you can tell when a particular instance of an MDB hasn't processed a new message in a while, and which message it is currently trying to process.

It's going to be very difficult to tell which message on a mirrored queue is the one that's causing the trouble.

I also think it would be easy for the sending application to log an exception when it hasn't received a reply - and then save out the message it didn't receive a reply for.
_________________
I am *not* the model of the modern major general.
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 » IBM MQ Java / JMS » Copy message into another queue
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.