Author |
Message
|
Trainee |
Posted: Fri Aug 07, 2009 5:24 am Post subject: Message Copy |
|
|
 Centurion
Joined: 27 Oct 2006 Posts: 124
|
Application want's to copy the message what ever it loads to a Queue, to another Queue say Log Queue for record purpose or for any kind of verification if they want to check later.
1.I can use mirrorq but it is been said it is not for Production environment
2.I can use q program to trigger each time message comes in to q.But not sure whether we can copy that message before it get processed from that Q.More over each time that q program triggers it will copy all the messages from that Q, there will be chance of duplicating the messages.
3.I am not sure we can use MQBroker(Pub/Sub) to do this.
Plase throw some light on this or any other alternative approaches for this.Your help is more appreciated.
Trainee |
|
Back to top |
|
 |
exerk |
Posted: Fri Aug 07, 2009 5:31 am Post subject: Re: Message Copy |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Trainee wrote: |
Application want's to copy the message what ever it loads to a Queue, to another Queue say Log Queue for record purpose or for any kind of verification if they want to check later.
1.I can use mirrorq but it is been said it is not for Production environment
2.I can use q program to trigger each time message comes in to q.But not sure whether we can copy that message before it get processed from that Q.More over each time that q program triggers it will copy all the messages from that Q, there will be chance of duplicating the messages.
3.I am not sure we can use MQBroker(Pub/Sub) to do this.
Plase throw some light on this or any other alternative approaches for this.Your help is more appreciated.
Trainee |
If it's that important to them, have them use application journalling. A copy of a message, or lack thereof, on a queue doesn't mean the 'original' message, which may have been on the other queue, may have been processed or not. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
zpat |
Posted: Fri Aug 07, 2009 5:35 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Easy, if it currently sends messages to queue A - so make this an alias for queue B.
Queue B is a new local queue which is input to a WMB message flow, that has two MQOutout nodes - queue C and new queue D.
Queue C can be the original destination queue, queue D can be the copy queue.
I did this and added a MQheader node to make the copies expire after a week so they would housekeep themselves.
You can turn it on and off by switching the alias between the original base queue and the one that is duplicated by the flow. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Aug 07, 2009 7:18 am Post subject: Re: Message Copy |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Trainee wrote: |
3.I am not sure we can use MQBroker(Pub/Sub) to do this. |
Without disagreeing with any of the previous posters, this will also work. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Aug 11, 2009 9:53 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
If you can't run to the expense of Broker or WAS you could always write an application to do the copy for you.
It would normally be triggered and when activated, it would read the message from the input queue and send it to the multiple destinations.
I have this running in production at several sites. This was paid for work so I can't give away the source but the problem is not overly difficult but you need to take care about ensuring that ALL the input Message properties are (as fas as possible) properly duplicated. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
sumit |
Posted: Wed Aug 12, 2009 8:02 am Post subject: Re: Message Copy |
|
|
Partisan
Joined: 19 Jan 2006 Posts: 398
|
Trainee wrote: |
2.I can use q program to trigger each time message comes in to q.But not sure whether we can copy that message before it get processed from that Q.More over each time that q program triggers it will copy all the messages from that Q, there will be chance of duplicating the messages. |
If you are concerned about the messages to be consumed before getting copied, you can use msg exit to get a copy of messages at channel level. This indeed is not the best option... but just an option.
And if application is placing message directly in the queue, you can modify the application to do a duplicate put on another queue. _________________ Regards
Sumit |
|
Back to top |
|
 |
RogerLacroix |
Posted: Wed Aug 12, 2009 9:12 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
zpat wrote: |
Easy, if it currently sends messages to queue A - so make this an alias for queue B.
Queue B is a new local queue which is input to a WMB message flow, that has two MQOutout nodes - queue C and new queue D.
Queue C can be the original destination queue, queue D can be the copy queue.
I did this and added a MQheader node to make the copies expire after a week so they would housekeep themselves.
You can turn it on and off by switching the alias between the original base queue and the one that is duplicated by the flow. |
If you don't have or don't want to use WMB then follow zpat's instructions and use the free open source project MMX (Message Multiplexer).
http://www.capitalware.biz/mmx_overview.html
MMX has lots of builtin features like logging, writing each message to a file, supports copying the message to 1 to 99 queues, the copied messages have a copy of the original MQMD, etc...
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
shashivarungupta |
Posted: Wed Aug 12, 2009 11:30 am Post subject: Re: Message Copy |
|
|
 Grand Master
Joined: 24 Feb 2009 Posts: 1343 Location: Floating in space on a round rock.
|
Trainee wrote: |
Application want's to copy the message what ever it loads to a Queue, to another Queue say Log Queue for record purpose or for any kind of verification if they want to check later.
1.I can use mirrorq but it is been said it is not for Production environment
2.I can use q program to trigger each time message comes in to q.But not sure whether we can copy that message before it get processed from that Q.More over each time that q program triggers it will copy all the messages from that Q, there will be chance of duplicating the messages.
3.I am not sure we can use MQBroker(Pub/Sub) to do this.
Plase throw some light on this or any other alternative approaches for this.Your help is more appreciated.
Trainee |
AFAIK, you can use the Broker to do that... Use the PROPAGATE functionality to do that.. I used that to send the same message to multiple queues (but you got to know where you are going to put the messages.)
Refer
http://publib.boulder.ibm.com/infocenter/wbihelp/v6rxmx/index.jsp?topic=/com.ibm.etools.mft.fp8.doc/ak05110_.htm
You can give a try on that. Its easy.  _________________ *Life will beat you down, you need to decide to fight back or leave it. |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Aug 12, 2009 10:09 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
If you are going to use Message Broker to duplicate/copy messages then you don't have to use a Compute Node and do propagations.
Just simply wire up the 'out' terminal of the MQInput Node to the 'in' terminal of one or more MQOutputNodes.
Obviously if you want to add error handling etc you can. I have seen thing method use in production at several sites. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
rajana |
Posted: Mon Aug 24, 2009 8:19 am Post subject: Re: Message Copy |
|
|
Newbie
Joined: 24 Aug 2009 Posts: 3
|
All,
I have the same requirement - to have messages that come into a queue that is currently accessed by a program copied to another queue. What would be a simple configuration to achieve this without the need to have MQ broker? Can messages be copied before they are picked up from the first queue?
Thanks for any help.
Raj |
|
Back to top |
|
 |
Vitor |
Posted: Mon Aug 24, 2009 8:29 am Post subject: Re: Message Copy |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
rajana wrote: |
Thanks for any help. |
Try reading the whole of this thread, which includes a number of other suggestions. None of them are a simple configuration change (there's nothing simple about a msg exit).
I'd also advise you to search the forum for the many illuminating discussions on this subject.
You'll also find many discussions on why doing this isn't always a good idea. Or often a good idea. Despite many, many sites thinking it's a good idea. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|