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 » WebSphere Message Broker (ACE) Support » logging question

Post new topic  Reply to topic
 logging question « View previous topic :: View next topic » 
Author Message
kenward
PostPosted: Sat Feb 26, 2011 2:39 pm    Post subject: logging question Reply with quote

Apprentice

Joined: 01 Jun 2010
Posts: 41
Location: Detroit, MI

Using Broker 7 (latest fix packs), I'm trying to drop a message from a flow onto an MQ queue so I can later log the message.

I would like to somehow associate the name of the flow (or really, any string value would be fine) with the message so I know what flow generated the message.

How do I add the value to the message so I can pick up that value in the other flow in a thread safe way?
Back to top
View user's profile Send private message
fatherjack
PostPosted: Sat Feb 26, 2011 3:50 pm    Post subject: Re: logging question Reply with quote

Knight

Joined: 14 Apr 2010
Posts: 522
Location: Craggy Island

kenward wrote:
I would like to somehow associate the name of the flow (or really, any string value would be fine) with the message so I know what flow generated the message.

How do I add the value to the message so I can pick up that value in the other flow ?


Add the flow name to the message ?

kenward wrote:
in a thread safe way?


Eh? Thread safe or not, the message flow name is the message flow name.
_________________
Never let the facts get in the way of a good theory.
Back to top
View user's profile Send private message
n1ghtrain
PostPosted: Sun Feb 27, 2011 2:10 am    Post subject: Reply with quote

Apprentice

Joined: 23 Mar 2006
Posts: 48
Location: Bangalore

You might want to take a look at IA9C Supportpac. It put flowname, threadname and whole lot of other information to the environment variable http://www-01.ibm.com/support/docview.wss?uid=swg24011189

v7.0 is not mentioned as supported. But i didnt had any issues with IA9c in my v7.0 broker (On latest supportpac too).
If you just need to get the flow name and if there is a one-to-one mapping from input queue(or URL) to the flowname then that could be another way.
Back to top
View user's profile Send private message Yahoo Messenger
joebuckeye
PostPosted: Mon Feb 28, 2011 5:25 am    Post subject: Reply with quote

Partisan

Joined: 24 Aug 2007
Posts: 365
Location: Columbus, OH

For v7 you don't need a fix pack to get the flow name.

You just need to be able to do a search in the InfoCenter.

http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/topic/com.ibm.etools.mft.doc/ak04897_.htm
Back to top
View user's profile Send private message
kenward
PostPosted: Mon Feb 28, 2011 8:09 am    Post subject: Reply with quote

Apprentice

Joined: 01 Jun 2010
Posts: 41
Location: Detroit, MI

I'm not worried about where to get the flow name from, but how to send it along with the message.

In flow A, I want to send the message it's working on to flow B to be logged (via an MQ queue). I also want to send along the name of Flow A (which I have covered) so that B knows where the message came from.

I didn't really want to alter the message, but I thought there might be a way to set some meta data about the message so B could read it.

Is the only option to alter the message, as fatherjack mentions?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Feb 28, 2011 8:31 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

So you want to exchange information between two flows, that are communicating using MQ.

And you don't want to change the MQ message.

There are many other ways you can exchange information between flows.

There's nothing that will automatically notify one flow that a message was previously processed by another flow.
Back to top
View user's profile Send private message
kenward
PostPosted: Mon Feb 28, 2011 8:33 am    Post subject: Reply with quote

Apprentice

Joined: 01 Jun 2010
Posts: 41
Location: Detroit, MI

Right, I want to exchange information between flows.

Is there a recommended way to do that?

-Jeff
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Feb 28, 2011 8:34 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Alter the MQ message.

Or construct a separate MQ message.

Or insert a record into a database.

Or use monitoring events to log this data, rather than trying to log it in your business logic.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Mar 01, 2011 5:00 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

n1ghtrain wrote:
You might want to take a look at IA9C Supportpac. It put flowname, threadname and whole lot of other information to the environment variable http://www-01.ibm.com/support/docview.wss?uid=swg24011189

v7.0 is not mentioned as supported. But i didnt had any issues with IA9c in my v7.0 broker (On latest supportpac too).
If you just need to get the flow name and if there is a one-to-one mapping from input queue(or URL) to the flowname then that could be another way.


You dont need a support pac to do logging. Just use log4j.

http://logging.apache.org/log4j/1.2/
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
Herbert
PostPosted: Tue Mar 01, 2011 6:38 am    Post subject: Re: logging question Reply with quote

Centurion

Joined: 05 Dec 2006
Posts: 146
Location: Leersum, The Netherlands

kenward wrote:
Using Broker 7 (latest fix packs), I'm trying to drop a message from a flow onto an MQ queue so I can later log the message.

I would like to somehow associate the name of the flow (or really, any string value would be fine) with the message so I know what flow generated the message.

How do I add the value to the message so I can pick up that value in the other flow in a thread safe way?


IMHO adding a RFH2 header to the message with your meta-data in the user folder is a perfect solution for this.

hgj
Back to top
View user's profile Send private message Visit poster's website
mqjeff
PostPosted: Tue Mar 01, 2011 7:07 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Broker v7 requires MQ v7.

The MQRFH2 is replaced by Message Properties in MQV7.

Even though Broker v7 currently only exposes Message Properties as RFH2 fields...
Back to top
View user's profile Send private message
gerdd
PostPosted: Mon Mar 07, 2011 4:58 am    Post subject: Reply with quote

Newbie

Joined: 04 Mar 2011
Posts: 8

mqjeff wrote:
Alter the MQ message.

Or construct a separate MQ message.

Or insert a record into a database.

Or use monitoring events to log this data, rather than trying to log it in your business logic.


If you hesitate to alter the message body, you may need to look at RFH2 headers for this (beats using a database).

If you like things complicated and you are willing to run all flows in this project in the same exe group you may also be able to devise something around shared variables. But remember you may have many mesasges in the air at the same time
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Mar 07, 2011 5:19 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

kenward wrote:
Right, I want to exchange information between flows.

Is there a recommended way to do that?

-Jeff


We use a Singleton to exchange information between flows of the same EG and to store state information when processing certain time+latency-sensitive request-reply transactions.

To exchange information between flows of different execution groups, we use a variety of methods:

- DB2
- SolidDB
- Shared Memory
- RPC
- MQ

There is also a SupportPac (IA91) but it is buggy and I don't recommend using the SupportPac in production for several reasons: (1) not supported by IBM unless you pay additional fee, (2) you can do the same thing yourself and have the source code to support your production environment, and (3) you will have a clear migration path when you upgrade to latest version (IA91 usually lags behind the latest version support for a while).

Lance
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
Esa
PostPosted: Mon Mar 07, 2011 5:31 am    Post subject: Re: logging question Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

kenward wrote:
Using Broker 7 (latest fix packs), I'm trying to drop a message from a flow onto an MQ queue so I can later log the message.

I would like to somehow associate the name of the flow (or really, any string value would be fine) with the message so I know what flow generated the message.

How do I add the value to the message so I can pick up that value in the other flow in a thread safe way?


I would simply make use of MQMD fields ApplIdentityData or ApplOriginData if you are not already using them for something else. MQ and Message Broker are not using these fields for anything. If your flownames are over 32 chars long you will have to truncate them or use some abbreviation to make them fit ApplIdentityData. ApplOriginData is only 4 chars long, could be enough for a broker name abbreviation?

The more natural place would be message properties, but Message Broker does not directly support them yet, as mqjeff pointed out.

If I understood correctly you just wanted to know how to carry the flow name with the message without modifying the payload message?
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 » WebSphere Message Broker (ACE) Support » logging question
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.