| Author | 
		  Message
		 | 
		
		  | eai_guy | 
		  
		    
			  
				 Posted: Mon May 17, 2010 10:51 am    Post subject: MQ Get Node | 
				     | 
			   
			 
		   | 
		
		
		   Voyager
 
 Joined: 18 Oct 2007 Posts: 90
  
  | 
		  
		    
			  
				Just wondering what extra properties are needed by MQGet node to get all messages from a queue.
 
 
I m trying below.
 
 
There are number of messages in a queue. I have below,
 
 
MQInput -> MQGet - > Compute nodes............
 
 
I trigger this flow by putting a message into MQ queue then I have number of messages on queue which is listened by MQGet node. But when flow triggers only 1st message is picked by MQGet and all remaining messages remain on queue.
 
 
I have seen below threads before posting this here,
 
 I m just trying to see no message terminal going to one of compute node when all messages are consumed.
 
 
Is there any special configuration I need to make on MQGet node to process all messages rather then only 1st message that it is doing now ?
 
 
Any help in this regard will be appreciated
 
 
http://www.mqseries.net/phpBB2/viewtopic.php?p=158479&sid=1c5a536537a3120eee5e6a45a1886d69
 
 
http://www.mqseries.net/phpBB2/viewtopic.php?p=223937&sid=54af3db550acde94dbdd03d391d85783 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Mon May 17, 2010 10:57 am    Post subject: Re: MQ Get Node | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| eai_guy wrote: | 
   
  
	| Is there any special configuration I need to make on MQGet node to process all messages rather then only 1st message that it is doing now ? | 
   
 
 
 
No, you need some kind of logic. The MQGet only ever reads a single message. The MQInput node reads a queue until empty.
 
 
Why use an MQGet at all? If the first message via MQInput triggers a read why not group the messages and read them all with an MQInput? _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | eai_guy | 
		  
		    
			  
				 Posted: Mon May 17, 2010 11:05 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Voyager
 
 Joined: 18 Oct 2007 Posts: 90
  
  | 
		  
		    
			  
				Hi,
 
 
Thanks for your reply.
 
 
I need to connect make understand file node for finish line when no messages are there on queue.(Also some business logic needs end of messages to calculate amounts)
 
 
So I thought MQGet node terminal will tell "No messages available" and I can connect this terminal for business logic and send Finish line to File node.
 
 
I will have to dig out the extra logic that you have referred in your last post   | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | eai_guy | 
		  
		    
			  
				 Posted: Mon May 17, 2010 11:15 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Voyager
 
 Joined: 18 Oct 2007 Posts: 90
  
  | 
		  
		    
			  
				Looping around MQget should make me happy I guess   | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mqjeff | 
		  
		    
			  
				 Posted: Mon May 17, 2010 11:43 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Master
 
 Joined: 25 Jun 2008 Posts: 17447
  
  | 
		  
		    
			  
				
   
	| eai_guy wrote: | 
   
  
	Looping around MQget should make me happy I guess   | 
   
 
 
 
Unless you do it wrong. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | zpat | 
		  
		    
			  
				 Posted: Mon May 17, 2010 12:09 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 19 May 2001 Posts: 5867 Location: UK 
  | 
		  
		    
			  
				A loop using inter-node wiring alone will soon result in a stack overflow if reading many messages (200 +).
 
 
It's better to use an ESQL loop with a propagate statement which drives MQGET.
 
 
It's not particularly obvious how to code this! | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | eai_guy | 
		  
		    
			  
				 Posted: Mon May 17, 2010 12:24 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Voyager
 
 Joined: 18 Oct 2007 Posts: 90
  
  | 
		  
		    
			  
				| Yeah.. That looks better option to propagate using ESQL . Thanks ! | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Mon May 17, 2010 1:20 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| mqjeff wrote: | 
   
  
	
   
	| eai_guy wrote: | 
   
  
	Looping around MQget should make me happy I guess   | 
   
 
 
 
Unless you do it wrong. | 
   
 
 
 
  _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |