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 » Message Copy

Post new topic  Reply to topic
 Message Copy « View previous topic :: View next topic » 
Author Message
Trainee
PostPosted: Fri Aug 07, 2009 5:24 am    Post subject: Message Copy Reply with quote

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
View user's profile Send private message
exerk
PostPosted: Fri Aug 07, 2009 5:31 am    Post subject: Re: Message Copy Reply with quote

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
View user's profile Send private message
zpat
PostPosted: Fri Aug 07, 2009 5:35 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Fri Aug 07, 2009 7:18 am    Post subject: Re: Message Copy Reply with quote

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
View user's profile Send private message
smdavies99
PostPosted: Tue Aug 11, 2009 9:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
sumit
PostPosted: Wed Aug 12, 2009 8:02 am    Post subject: Re: Message Copy Reply with quote

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
View user's profile Send private message Yahoo Messenger
RogerLacroix
PostPosted: Wed Aug 12, 2009 9:12 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
shashivarungupta
PostPosted: Wed Aug 12, 2009 11:30 am    Post subject: Re: Message Copy Reply with quote

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
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Wed Aug 12, 2009 10:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
rajana
PostPosted: Mon Aug 24, 2009 8:19 am    Post subject: Re: Message Copy Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Mon Aug 24, 2009 8:29 am    Post subject: Re: Message Copy Reply with quote

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
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 » Message Copy
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.