| Author | 
		  Message
		 | 
		
		  | dsmq | 
		  
		    
			  
				 Posted: Wed Sep 25, 2002 10:02 am    Post subject: pub/sub | 
				     | 
			   
			 
		   | 
		
		
		   Acolyte
 
 Joined: 20 Jun 2002 Posts: 59
  
  | 
		  
		    
			  
				I designed a simple flow for pub/sub
 
 
my flow is 
 
 
MQInput --> Compute --> Publish 
 
 
in my compute node i specified the Topic. i deployed into the Broker
 
 
after that i dropped the xml message in the Input Queue. What happens to the message , where should i look for the published messages.
 
 
Thanks | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | bower5932 | 
		  
		    
			  
				 Posted: Wed Sep 25, 2002 11:33 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Knight
 
 Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA 
  | 
		  
		    
			  
				| You should have a subscriber that is subscribing to the topic.  When he subscribes, he specifies a queue where he wants his messages to go.  This is where you would look. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | dsmq | 
		  
		    
			  
				 Posted: Wed Sep 25, 2002 3:29 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Acolyte
 
 Joined: 20 Jun 2002 Posts: 59
  
  | 
		  
		    
			  
				Thanks for your reply
 
But how do i design a flow for subscriber, what nodes should i use. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | JLRowe | 
		  
		    
			  
				 Posted: Thu Sep 26, 2002 1:00 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Yatiri
 
 Joined: 25 May 2002 Posts: 664 Location: South East London 
  | 
		  
		    
			  
				You will need 2 flows, one to register the subscription and another to process the publications received from the subscription.
 
 
Read the pub/sub section of the programming guide. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | dsmq | 
		  
		    
			  
				 Posted: Thu Sep 26, 2002 7:47 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Acolyte
 
 Joined: 20 Jun 2002 Posts: 59
  
  | 
		  
		    
			  
				Thanks for your reply
 
Could you pls give detailed information about registering  the Subscriber into the broker.
 
 
Thanks | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jdouch | 
		  
		    
			  
				 Posted: Thu Sep 26, 2002 8:09 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 31 May 2002 Posts: 32 Location: London, UK 
  | 
		  
		    
			  
				all you need is a input node, a compute node to create the RFH2 header if your subscribing app doesn't create it, which should contain...
 
 
command='RegSub';
 
Topic='XYZ';
 
QmgrName="Qmgr to Publish To';
 
QName='Q to publish to';
 
 
... all those should be prefixed with OutputRoot.MQRFH2.psc.
 
 
..and an output node sending the message to the SYSTEM.BROKER.CONTROL.QUEUE
 
 
hope this helps _________________ Julian Douch
 
E-business Solutions Consultant
 
 
WMQ/WMQI Specialist | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Miriam Kaestner | 
		  
		    
			  
				 Posted: Fri Sep 27, 2002 1:50 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Centurion
 
 Joined: 26 Jun 2001 Posts: 103 Location: IBM IT Education Services, Germany 
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | dsmq | 
		  
		    
			  
				 Posted: Fri Sep 27, 2002 8:35 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Acolyte
 
 Joined: 20 Jun 2002 Posts: 59
  
  | 
		  
		    
			  
				Hi
 
 
I am using following ESQL Code for registering the Subscriber in my Compute Node
 
 
SET OutputRoot = InputRoot;
 
-- Enter SQL below this line.  SQL above this line might be regenerated, causing any modifications to be lost.
 
SET OutputRoot.MQRFH2.psc.command='RegSub'; 
 
SET OutputRoot.MQRFH2.psc.Topic='test'; 
 
SET OutputRoot.MQRFH2.psc.QmgrName='Q2'; 
 
SET OutputRoot.MQRFH2.psc.QName='AFIDEV2'; 
 
 
My OutputNode Queue Name is SYSTEM.BROKER.CONTROL.QUEUE
 
 
I am unable to look at the topic test in my control center.
 
 
can any body help me in this.
 
 
Regards | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | sam_mq | 
		  
		    
			  
				 Posted: Fri Sep 27, 2002 8:52 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 22 Aug 2002 Posts: 24
  
  | 
		  
		    
			  
				Hi ,
 
 
your esql should look like this, and u should send ur QMname and topic in the input message...
 
 
SET OutputRoot.MQMD.Format =  'MQRFH2';
 
SET OutputRoot.MQRFH2.psc.Command = 'RegSub';
 
SET OutputRoot.MQRFH2.psc.Topic = InputRoot.XML.(XML.tag)Sub.Topic;
 
SET OutputRoot.MQRFH2.psc.QMgrName = InputRoot.XML.(XML.tag)Sub.QmgrName;
 
SET OutputRoot.MQRFH2.psc.QName = InputRoot.XML.(XML.tag)Sub.QName;
 
 
Good Luck!!! | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | dsmq | 
		  
		    
			  
				 Posted: Fri Sep 27, 2002 9:36 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Acolyte
 
 Joined: 20 Jun 2002 Posts: 59
  
  | 
		  
		    
			  
				Hi Sam
 
 
i did the same way what u suggested, Still same problem
 
 
any idea
 
 
Thanks | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | dsmq | 
		  
		    
			  
				 Posted: Fri Sep 27, 2002 9:53 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Acolyte
 
 Joined: 20 Jun 2002 Posts: 59
  
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | NickB | 
		  
		    
			  
				 Posted: Thu Oct 03, 2002 2:30 am    Post subject: Subscription not appearing! | 
				     | 
			   
			 
		   | 
		
		
		   Centurion
 
 Joined: 20 May 2001 Posts: 107 Location: Zurich Financial Services 
  | 
		  
		    
			  
				I've got the following eSQL in my compute node and the output node maps to queue SYSTEM.BROKER.CONTROL.QUEUE:
 
 
SET OutputRoot.MQMD.Format = 'MQHRF2  ';
 
SET OutputRoot.MQRFH2.psc.Command = 'RegSub';
 
SET OutputRoot.MQRFH2.psc.Topic = 'NickLevelA/#';
 
SET OutputRoot.MQRFH2.psc.QMgrName = 'UK01XM1';
 
SET OutputRoot.MQRFH2.psc.QName = 'Q1';
 
 
I put a dummy message to the input queue to the flow and waited for the subscription to appear in the list of subscriptions in my Control Centre.  No subscription appeared.  The message was taken from SYSTEM.BROKER.CONTROL.QUEUE so must have been processed.
 
 
Any ideas? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | dsmq | 
		  
		    
			  
				 Posted: Thu Oct 03, 2002 4:11 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Acolyte
 
 Joined: 20 Jun 2002 Posts: 59
  
  | 
		  
		    
			  
				Hi Nick
 
 
use following Esql code in you r Compute Node.Send topic,Queue Manager name from Input XML Message.
 
 
SET OutputRoot.MQMD.Format = 'MQHRF'; 
 
SET OutputRoot.MQRFH2.psc.Command = 'RegSub'; 
 
SET OutputRoot.MQRFH2.psc.Topic = InputRoot.XML.Sub.Topic; 
 
SET OutputRoot.MQRFH2.psc.QMgrName =InputRoot.XML.Sub.QmgrName; 
 
SET OutputRoot.MQRFH2.psc.QName = InputRoot.XML.Sub.QName;
 
 
Thanks | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | NickB | 
		  
		    
			  
				 Posted: Thu Oct 03, 2002 4:50 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Centurion
 
 Joined: 20 May 2001 Posts: 107 Location: Zurich Financial Services 
  | 
		  
		    
			  
				| Not sure why setting the format to MQHRF rather than MQHRF2 would help!  Anyway I tried changing the setting of the MQMD.Format and this didn't help - still no subscription in my Control Centre. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | kirani | 
		  
		    
			  
				 Posted: Thu Oct 03, 2002 7:44 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Jedi Knight
 
 Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA 
  | 
		  
		    
			  
				Nick,
 
 
Length of MQMD.Format field is 8, so you should append 2 spaces after MQHRF2 string, or you could use constant MQFMT_RF_HEADER_2 in your code.
 
 
Try like this ..
 
   
	| Code: | 
   
  
	
 
SET OutputRoot.MQMD.Format = MQFMT_RF_HEADER_2; 
 
SET OutputRoot.MQRFH2.psc.Command = 'RegSub'; 
 
SET OutputRoot.MQRFH2.psc.Topic = InputRoot.XML.Sub.Topic; 
 
SET OutputRoot.MQRFH2.psc.QMgrName =InputRoot.XML.Sub.QmgrName; 
 
SET OutputRoot.MQRFH2.psc.QName = InputRoot.XML.Sub.QName; 
 
 | 
   
 
 _________________ 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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |