|  | 
 
  
    | RSS Feed - WebSphere MQ Support | RSS Feed - Message Broker Support |  
 
  
	|    |  |  
  
	| Two interconnected Message Flows | « View previous topic :: View next topic » |  
  	| 
		
		
		  | Author | Message |  
		  | javaforvivek | 
			  
				|  Posted: Mon Sep 06, 2004 12:52 am    Post subject: Two interconnected Message Flows |   |  |  
		  |  Master
 
 
 Joined: 14 Jun 2002Posts: 282
 Location: Pune,India
 
 | 
			  
				| Hi, I am developing two message flows, such that, MQOutput Node of one message flow is connected to FAILURE queue. MQInput Node of the second message flow is also connected to this FAILURE queue, from where it will consume the failed message and process it to log it to database.
 My problem is, when the first message flow puts the message to FAILURE queue, second message flow doesn't pick it up..
 Is there any reason for this? Or we just can't design it like this?
 _________________
 Vivek
 ------------------------------------------------------
 ...when you have eliminated the impossible, whatever remains, however improbable, must be the truth.
 |  |  
		  | Back to top |  |  
		  |  |  
		  | jefflowrey | 
			  
				|  Posted: Mon Sep 06, 2004 4:59 am    Post subject: |   |  |  
		  | Grand Poobah
 
 
 Joined: 16 Oct 2002Posts: 19981
 
 
 | 
			  
				| Sure you can design like this, and sure it works. 
 Are you sure you are committing the messages?
 _________________
 I am *not* the model of the modern major general.
 |  |  
		  | Back to top |  |  
		  |  |  
		  | kirani | 
			  
				|  Posted: Mon Sep 06, 2004 9:33 am    Post subject: |   |  |  
		  | Jedi Knight
 
 
 Joined: 05 Sep 2001Posts: 3779
 Location: Torrance, CA, USA
 
 | 
			  
				| Also, Try to put a try-catch node in your Failure path to capture any error. For example, in 1st message flow, 
 MQInput(Failure)->TryCatch(Try)->MQOutput (Failq)
 >TryCatch(catch)->Trace Node
 _________________
 Kiran
 
 
 IBM Cert. Solution Designer & System Administrator - WBIMB V5
 IBM Cert. Solutions Expert - WMQI
 IBM Cert. Specialist - WMQI, MQSeries
 IBM Cert. Developer - MQSeries
 
 
 |  |  
		  | Back to top |  |  
		  |  |  
		  | ernest-ter.kuile | 
			  
				|  Posted: Mon Sep 06, 2004 11:13 pm    Post subject: |   |  |  
		  |  Apprentice
 
 
 Joined: 13 May 2002Posts: 49
 Location: KLM Holland
 
 | 
			  
				| 
   
	| kirani wrote: |  
	| Also, Try to put a try-catch node in your Failure path to capture any error. For example, in 1st message flow, 
 MQInput(Failure)->TryCatch(Try)->MQOutput (Failq)
 >TryCatch(catch)->Trace Node
 |  
 You can also add a trace to the success output of the MQOutput. This is only called once the MQOutput was succesfully commited, and your localEnvironement will then contain _where_ is was commited to (which might not be what you expected).
 
 Alternatively put a trace node after the failure output of MQoutput (but don't forget to also add a throw node after that, otherwise your error will vanish)
 
 - I'm sure you already checked this, but is the message actually appearing on your failure Queue ? (in which case your first flow is fine, and the problem is with the second flow.)
 - if this isn't the case, is there something else that might be grabbing your message ? might it be on the dead letter Queue ?
 
 Ernest.
 |  |  
		  | Back to top |  |  
		  |  |  
		  | kirani | 
			  
				|  Posted: Tue Sep 07, 2004 4:30 pm    Post subject: |   |  |  
		  | Jedi Knight
 
 
 Joined: 05 Sep 2001Posts: 3779
 Location: Torrance, CA, USA
 
 | 
			  
				| 
   
	| ernest-ter.kuile wrote: |  
	| Alternatively put a trace node after the failure output of MQoutput (but don't forget to also add a throw node after that, otherwise your error will vanish)
 
 |  May I know what's the reason for putting a Throw node at the end? Also, note that by adding the Throw node you are changing the original ExceptionList, so at a higher-level if you have a try-catch block, it will not reflect the original ExceptionList.
 _________________
 Kiran
 
 
 IBM Cert. Solution Designer & System Administrator - WBIMB V5
 IBM Cert. Solutions Expert - WMQI
 IBM Cert. Specialist - WMQI, MQSeries
 IBM Cert. Developer - MQSeries
 
 
 |  |  
		  | Back to top |  |  
		  |  |  
		  | ernest-ter.kuile | 
			  
				|  Posted: Tue Sep 07, 2004 11:19 pm    Post subject: |   |  |  
		  |  Apprentice
 
 
 Joined: 13 May 2002Posts: 49
 Location: KLM Holland
 
 | 
			  
				| 
   
	| kirani wrote: |  
	| May I know what's the reason for putting a Throw node at the end? Also, note that by adding the Throw node you are changing the original ExceptionList, so at a higher-level if you have a try-catch block, it will not reflect the original ExceptionList. |  
 Add a throw node if you want a higher level exception handling to take place. By placing a trace or compute node on the failure line after MQOutput will prevent the normal exception handling to take place (after all, you're "handling" it at that point). If nothing follows, the message is dropped, unless an explicite throw node is added.
 
 Obvioulsy, a try catch arround it would do the same thing.
 
 Sure, you are right, the Exceptionlist is changed, but then the ExceptionList content isn't always the most usefull thing in WMQI, often containing loads of hay, beside the needle your looking for.
 
 I usually try to use the faillure outputs to handle or trace errors as close as possible to their source (often to simply add a simple string in the Environment), after which I rethrow to allow for a single error exit from the flow which then uses that string to pinpoint the error.
 |  |  
		  | Back to top |  |  
		  |  |  
		  | javaforvivek | 
			  
				|  Posted: Wed Sep 08, 2004 4:03 am    Post subject: |   |  |  
		  |  Master
 
 
 Joined: 14 Jun 2002Posts: 282
 Location: Pune,India
 
 | 
			  
				| Ernest wrote: 
 
   
	| Quote: |  
	| I'm sure you already checked this, but is the message actually appearing on your failure Queue ? (in which case your first flow is fine, and the problem is with the second flow.)
 if this isn't the case, is there something else that might be grabbing your message ? might it be on the dead letter Queue ?
 
 |  
 As a part of unit testing, I purposely created some errors and diverted the message to the Failure Queue. And they are still there. There is no other utility which consumes them from Failure Queue, and they are not going to the DL Queue.
 
 jefflowry wrote:
 
 
   
	| Quote: |  
	| Are you sure you are committing the messages?
 
 |  I haven't changed any of the default properties of the MQOutput Node, so I believe, the messages are automatically committed to the failure queue (I am able to browse these messages on the failure queue in the MQ Explorer)
 _________________
 Vivek
 ------------------------------------------------------
 ...when you have eliminated the impossible, whatever remains, however improbable, must be the truth.
 |  |  
		  | Back to top |  |  
		  |  |  
		  | EddieA | 
			  
				|  Posted: Wed Sep 08, 2004 9:12 am    Post subject: |   |  |  
		  |  Jedi
 
 
 Joined: 28 Jun 2001Posts: 2453
 Location: Los Angeles
 
 | 
			  
				| 
   
	| Quote: |  
	| I am able to browse these messages on the failure queue in the MQ Explorer |  So, I guess they are committed then.
 
 I'd check, and double check, the settings on the Input node to make sure it's reading the correct queue and there are no options set that would stop it from reading all messages.
 
 Cheers,
 _________________
 Eddie Atherton
 IBM Certified Solution Developer - WebSphere Message Broker V6.1
 IBM Certified Solution Developer - WebSphere Message Broker V7.0
 |  |  
		  | Back to top |  |  
		  |  |  
		  | javaforvivek | 
			  
				|  Posted: Wed Sep 08, 2004 8:31 pm    Post subject: |   |  |  
		  |  Master
 
 
 Joined: 14 Jun 2002Posts: 282
 Location: Pune,India
 
 | 
			  
				| All, I am able to process the messages now. My message definition was incorrect, and hence my input node (which is configured to read messages from Failure queue) can't read them.
 Thanks for the discussions and support.
 _________________
 Vivek
 ------------------------------------------------------
 ...when you have eliminated the impossible, whatever remains, however improbable, must be the truth.
 |  |  
		  | Back to top |  |  
		  |  |  
		  |  |  |  
  
	|    |  | Page 1 of 1 |  
 
 
  
  	| 
		
		  | 
 
 | 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
 
 |  |  |  |