| Author | 
		  Message
		 | 
		
		  | wese345 | 
		  
		    
			  
				 Posted: Tue Dec 10, 2013 5:31 am    Post subject: dynamic get messages from one queue by CorrelId | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 05 Aug 2013 Posts: 21
  
  | 
		  
		    
			  
				Hi,guys
 
 
I want to ask for a advice or tell me how to deal with this senario.
 
 
I have two queues.
 
Q1 stores messages that is formed by XML.
 
Q2 stores messages that is bitstream.
 
Now,I read a message in Q1, and then get  a value which is called 'msgId'.Then use this value to get a group messages from Q2 that each message's CorrelId is the same as 'msgId'.
 
 
Here is my problem. 
 
My message flow like this: MQInput(read from Q1)->Compute->MQGet(get message by CorrelId from Q2)->MQOutput
 
When I read a message from Q1,I get one message from Q2. The other messages that contains the same value 'msgId' still remain in Q2. How can I get them together.
 
    
 
 
Please help me .Or if you have a better way to reach the same result.
 
Thanks | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Tue Dec 10, 2013 6:08 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				Use a Collector node to read the messages from Q1 & Q2, forming all the Q1 messages and Q2 messages which share an id value (accepting that the value is in 2 different locations) into a single collection. 
 
 
Then process the collection. _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | smdavies99 | 
		  
		    
			  
				 Posted: Tue Dec 10, 2013 6:15 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land. 
  | 
		  
		    
			  
				
   
	| Vitor wrote: | 
   
  
	Use a Collector node to read the messages from Q1 & Q2, forming all the Q1 messages and Q2 messages which share an id value (accepting that the value is in 2 different locations) into a single collection. 
 
 
Then process the collection. | 
   
 
 
 
does the collector node read messages from a Queue? 
 
I must have missed that bit. _________________ WMQ User since 1999
 
MQSI/WBI/WMB/'Thingy' User since 2002
 
Linux user since 1995
 
 
 
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Tue Dec 10, 2013 6:23 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| smdavies99 wrote: | 
   
  
	
   
	| Vitor wrote: | 
   
  
	Use a Collector node to read the messages from Q1 & Q2, forming all the Q1 messages and Q2 messages which share an id value (accepting that the value is in 2 different locations) into a single collection. 
 
 
Then process the collection. | 
   
 
 
 
does the collector node read messages from a Queue? 
 
I must have missed that bit. | 
   
 
 
 
Alright, alright, feed the messages via 2 MQInput nodes into a Collector node...    _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | NealM | 
		  
		    
			  
				 Posted: Tue Dec 17, 2013 4:59 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Master
 
 Joined: 22 Feb 2011 Posts: 230 Location: NC or Utah (depends) 
  | 
		  
		    
			  
				| ....or, if you expect all the matching messages to be already waiting on Q2 when you get the kickoff message on Q1, just change your flow to put your MQGet inside a loop that quits when your MQGet times out (and set a short timeout). | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Wed Dec 18, 2013 10:52 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 Location: LI,NY 
  | 
		  
		    
			  
				Realize that you need to build your loop in such a way that it contains a propagate and the MQGet node is down on the propagate path...   _________________ MQ & Broker admin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |