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 one detect the a flow has stopped

Post new topic  Reply to topic
 Can one detect the a flow has stopped « View previous topic :: View next topic » 
Author Message
bbakerman
PostPosted: Sun Sep 25, 2005 11:38 pm    Post subject: Can one detect the a flow has stopped Reply with quote

Apprentice

Joined: 17 Dec 2003
Posts: 41

I have a custom TCPIP input node built in Java that "caches" connections to the other end. It does this to allow long running connections between systems.

Also the design calls for a peer to peer type of arrangement between sending and receiving systems and there is only ever one thread instance of the input flow.

However if I stop the message flow, I dont get an event on the input node per se and hence I cant "clear" my cache of TCPIP connection information.

I have implemented the onDelete() method which cleans up but this only happens if I delete the flow.

According to the doco, it seems

Quote:

A Java user-defined input node is destroyed when the node is deleted or the broker is shut down. You do not need to include anything in your code that specifies the node should be physically deleted, because this can be handled by the garbage collector.

However, if you want to be notified that a node is about to be deleted, you can use the onDelete method. You might want to do this if there are resources other than those that will be garbage collected that you want to delete. For example, if you have opened a socket, this will not be properly closed again when the node is automatically deleted. You can include this instruction in your onDelete method to ensure that the socket is properly closed.


Is there a way to detect that the flow is in fact not running and hence clean up any cached resources.

Is there an event for start and stopping of the flow?
Back to top
View user's profile Send private message
bbakerman
PostPosted: Tue Sep 27, 2005 3:21 pm    Post subject: Reply with quote

Apprentice

Joined: 17 Dec 2003
Posts: 41

OK what I thought I could do was "subscribe" to the operational events from within my Java node and then be told when the message flow has started and stopped.

I quick play around with RFHUtil pub/sub and the following topic :

$SYS/Broker/TESTBRK01/Status/ExecutionGroup/default


show me this
Code:

<Broker uuid="a31170cd-0501-0000-0080-cc3bc3b76f33">
 <ExecutionGroup uuid="3799195d-0301-0000-0080-be3cc6dcc426">
  <Stop>
   <MessageFlow uuid="1034c795-0601-0000-0080-8e4716eb7edd"/>
  </Stop>
 </ExecutionGroup>
</Broker>

...
...
<Broker uuid="a31170cd-0501-0000-0080-cc3bc3b76f33">
 <ExecutionGroup uuid="3799195d-0301-0000-0080-be3cc6dcc426">
  <Start>
   <MessageFlow uuid="1034c795-0601-0000-0080-8e4716eb7edd"/>
  </Start>
 </ExecutionGroup>
</Broker>


Cool I can tell if flow has been stopped or started. However I cant see a easy way to resolve the flow UUID. Without the name I can be sure that the flow being stopped is the flow the node is contained within.

I know the name of the broker/execution group/flow name from the Java Node API however it does not provide the UUID.

Does any one know how I can resolve the UUID nack to the flow name?

I am hoping I can do this via some "magic" pub/sub topic request to the broker?

I have a sneaking susspicion that this info is in the broker database but I would rather not read the DB if I dont have to (for performance and complexity reasons mainly)

Some management tools such as the Candle Omegamon agent for WBI broker seem to be able to get this flow information.

From what I can infer they dont do this via database lookup which would suggest to em that there is a "magic" topic name that one can send to the broker to get the state and names of flows etc... Any clues IBMer's
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 » Can one detect the a flow has stopped
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.