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 » Can I get the processId of a message flow?

Post new topic  Reply to topic
 Can I get the processId of a message flow? « View previous topic :: View next topic » 
Author Message
JYama
PostPosted: Thu Aug 23, 2007 6:42 pm    Post subject: Can I get the processId of a message flow? Reply with quote

Master

Joined: 27 Mar 2002
Posts: 281

Hi experts,

I'd like to know about a way to retrieve the threadId of a message flow.
How can I code this in ESQL?

Is there anybody who experienced this?

I'm using WMBv6 on AIX, BTW.

Many thanks in advance,
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Thu Aug 23, 2007 9:47 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi JYama,

Broker properties accessible from ESQL and Java

Regards.
Back to top
View user's profile Send private message Send e-mail
JYama
PostPosted: Thu Aug 23, 2007 9:55 pm    Post subject: Reply with quote

Master

Joined: 27 Mar 2002
Posts: 281

elvis_gn wrote:

Broker properties accessible from ESQL and Java

Thank you for your help.
I learned a way to retrieve the processId of a broker, thank you for that, but I also want to know the threadId of a message flow.
Is it accessible in ESQL?
Do you know something on this?
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Thu Aug 23, 2007 10:02 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi JYama,

That link was to say that it's not listed and hence most probably not available

Can we know your requirement, perhaps we will have a workaround...

Regards.
Back to top
View user's profile Send private message Send e-mail
JYama
PostPosted: Thu Aug 23, 2007 10:18 pm    Post subject: Reply with quote

Master

Joined: 27 Mar 2002
Posts: 281

elvis_gn wrote:

Can we know your requirement, perhaps we will have a workaround...

Well, I want to exchange the threadId between message flows.

For example, let's say there are two message flows.
The 1st flow is invoked by an MQ message input and it passes on the output message processed to the 2nd flow.
I want to transfer the threadId of the 1st flow to the 2nd flow via a local queue.
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Thu Aug 23, 2007 11:08 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi JYama,

You could use flow names to relate the flows, but then you might have additional instances, so it won't work.

The threadId is not available so that's out of the question I guess.

Sorry, run out of ideas

Regards.
Back to top
View user's profile Send private message Send e-mail
JYama
PostPosted: Thu Aug 23, 2007 11:12 pm    Post subject: Reply with quote

Master

Joined: 27 Mar 2002
Posts: 281

Well,,,, ,,, I know threadIds are only available in the UserTrace,,, so I guess there should be a way to retrieve the number...

Anyway, thank you for your help and I appreciate it.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Aug 24, 2007 5:57 am    Post subject: Reply with quote

Grand High Poobah

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

JYama wrote:
elvis_gn wrote:

Can we know your requirement, perhaps we will have a workaround...

Well, I want to exchange the threadId between message flows.

For example, let's say there are two message flows.
The 1st flow is invoked by an MQ message input and it passes on the output message processed to the 2nd flow.
I want to transfer the threadId of the 1st flow to the 2nd flow via a local queue.

You are still talking about a solution here not a requirement!

What is the reason you would like to transfer the threadid?

I am thinking here threadId, execution context => message affinity??
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
JYama
PostPosted: Fri Aug 24, 2007 7:05 am    Post subject: Reply with quote

Master

Joined: 27 Mar 2002
Posts: 281

Quote:
What is the reason you would like to transfer the threadid?

Just to relate various and nested syslog outputs based on business scenarios.


Last edited by JYama on Fri Aug 24, 2007 7:17 am; edited 1 time in total
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Aug 24, 2007 7:16 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Have you looked at Broker User Exits?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
JYama
PostPosted: Fri Aug 24, 2007 7:28 am    Post subject: Reply with quote

Master

Joined: 27 Mar 2002
Posts: 281

jefflowrey wrote:
Have you looked at Broker User Exits?

No, I haven't.
I wanted to achieve it with just basic functions within ESQL but coding an user exit is too much so I'll give up this.

Thanks,
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Aug 24, 2007 8:24 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You can get threadID from java.

It might work to call a java static procedure from ESQL to get the threadID that esql is running.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Aug 24, 2007 8:43 am    Post subject: Reply with quote

Grand High Poobah

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

jefflowrey wrote:
You can get threadID from java.

It might work to call a java static procedure from ESQL to get the threadID that esql is running.

Jeff,

Wouldn't this rather give the threadId within the JVM that is executing the java static procedure ??

How far up to the parent thread would you need to go?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Fri Aug 24, 2007 8:52 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You're probably right. I've never tried it.

I've never seen much value in keeping track of which thread id or process id or etc. a given message flow is running in.

I've always been more interested in what happens to each individual message, rather than in what happens in each individual flow instance.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Aug 24, 2007 1:54 pm    Post subject: Reply with quote

Grand High Poobah

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

And if you need to, you could use a local and shared counter.
If the local counter (local to the flow instance (Environment.*) is not set increment the shared one in an ATOMIC way and make the local one be that result. Now if you prefix each of your outputs by the value of the counter and flow name, you would have a reliable correlation... within the same execution group/flow...

Another one might be to assign each instance of the flow a unique variable...
However this is only guaranteed if the eg never stops an instance if it is no longer needed. Otherwise you would have to allow for a bigger max value than the max number of instances...

If the value is not important in itself (correlation happens by machine) you could as well use a GUIID.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Can I get the processId of a message flow?
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.