| Author | 
		  Message
		 | 
		
		  | bobbee | 
		  
		    
			  
				 Posted: Wed Apr 03, 2019 6:59 am    Post subject: Request/Repy using Pub/Sub | 
				     | 
			   
			 
		   | 
		
		
		    Knight
 
 Joined: 20 Sep 2001 Posts: 546 Location: Tampa 
  | 
		  
		    
			  
				The client has implemented this using typical queuing. At the gateway they changed to a QAlias to a topic and have set a SUBSCTIPTION to deliver this to the RESPONSE queue. When switching to the QAlias-Topic distribution the message being passed is loosing the CorrelationID passed in the message and a new one is being generated. Is there a way to do this? 
 
 
They have tried wiping out the auto-generated CorrellId in the Subscription and have set the report option of Pass-Correlid when writing the reply to the queue/topic.
 
 
Topology:
 
 
Request App<==>IIB<==>Gateway<==>Reply App | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | hughson | 
		  
		    
			  
				 Posted: Wed Apr 03, 2019 1:33 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Padawan
 
 Joined: 09 May 2013 Posts: 1967 Location: Bay of Plenty, New Zealand 
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | bobbee | 
		  
		    
			  
				 Posted: Thu Apr 04, 2019 4:20 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Knight
 
 Joined: 20 Sep 2001 Posts: 546 Location: Tampa 
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | bobbee | 
		  
		    
			  
				 Posted: Thu Apr 04, 2019 4:39 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Knight
 
 Joined: 20 Sep 2001 Posts: 546 Location: Tampa 
  | 
		  
		    
			  
				I believe they are using the DEF Sub command. So I am believing this is what they need.
 
 
   
	| Code: | 
   
  
	
 
DESTCORL( string )
 
The CorrelId used for messages published to this subscription. 
 
A blank value (default) results in a system generated correlation identifier being used.
 
If set to ' 000000000000000000000000000000000000000000000000 ' (48 zeros) the CorrelId set by the publishing application will be maintained in the copy of the message delivered to the subscription, unless messages are propagated across a publish/subscribe hierarchy.
 
 | 
   
 
 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Thu Apr 04, 2019 12:29 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 Location: LI,NY 
  | 
		  
		    
			  
				
   
	| bobbee wrote: | 
   
  
	I believe they are using the DEF Sub command. So I am believing this is what they need.
 
 
   
	| Code: | 
   
  
	
 
DESTCORL( string )
 
The CorrelId used for messages published to this subscription. 
 
A blank value (default) results in a system generated correlation identifier being used.
 
If set to ' 000000000000000000000000000000000000000000000000 ' (48 zeros) the CorrelId set by the publishing application will be maintained in the copy of the message delivered to the subscription, unless messages are propagated across a publish/subscribe hierarchy.
 
 | 
   
 
 | 
   
 
 
However note the caveat of the pub/sub hierarchy where passing MQCI_NONE doesn't have the expected effect!!!   _________________ MQ & Broker admin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | bobbee | 
		  
		    
			  
				 Posted: Thu Apr 04, 2019 12:33 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Knight
 
 Joined: 20 Sep 2001 Posts: 546 Location: Tampa 
  | 
		  
		    
			  
				I did the following and sent a message through and the Correlation ID arrived as sent. I am having my customer test it now.
 
 
   
	| Code: | 
   
  
	
 
DEFINE QL(BOBBEEOUT)
 
 
DEFINE TOPIC('mtopic.TOPIC') TOPICSTR('mtopic') REPLACE
 
 
DEFINE QALIAS('MY_ALIAS') TARGET('mtopic.TOPIC') TARGTYPE(TOPIC) REPLACE
 
 
DEFINE SUBsub(CORRELID) topicstr('mtopic') destcorl('000000000000000000000000000000000000000000000000') DEST(BOBBEEOUT)
 
 | 
   
 
 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | hughson | 
		  
		    
			  
				 Posted: Thu Apr 04, 2019 11:45 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Padawan
 
 Joined: 09 May 2013 Posts: 1967 Location: Bay of Plenty, New Zealand 
  | 
		  
		    
			  
				If you'd read the link I supplied in the first answer, you would have seen that you don't have to provide all 48 zeros.
 
 
DESTCORL(0) will suffice.
 
 
Cheers,
 
Morag _________________ Morag Hughson @MoragHughson
 
IBM MQ Technical Education Specialist
 
Get your IBM MQ training here!
 
MQGem Software | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | bobbee | 
		  
		    
			  
				 Posted: Fri Apr 05, 2019 2:17 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Knight
 
 Joined: 20 Sep 2001 Posts: 546 Location: Tampa 
  | 
		  
		    
			  
				I would never argue with the Queen of MQ. 
 
 
I was on a screen share and I had her take the current SUB and alter it and put zeros in there. That had no effect. When I saw this I said 'Been there done that" but I did it anyway. Maybe there is a difference in what I did then and this. But I will amend my command. But Hey, what's 47 zeros between friends!!! Unless it iwas on my pay check!! Thanks for your help. It was very useful.................as always!! | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | bruce2359 | 
		  
		    
			  
				 Posted: Fri Apr 05, 2019 4:03 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Poobah
 
 Joined: 05 Jan 2008 Posts: 9486 Location: US: west coast, almost. Otherwise, enroute. 
  | 
		  
		    
			  
				47? _________________ I like deadlines. I like to wave as they pass by.
 
ב''ה
 
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | bobbee | 
		  
		    
			  
				 Posted: Fri Apr 05, 2019 4:21 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Knight
 
 Joined: 20 Sep 2001 Posts: 546 Location: Tampa 
  | 
		  
		    
			  
				destcorl('000000000000000000000000000000000000000000000000')
 
 
minus
 
 
destcorl('0')
 
 
equals
 
 
destcorl('00000000000000000000000000000000000000000000000') | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | bruce2359 | 
		  
		    
			  
				 Posted: Fri Apr 05, 2019 4:32 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Poobah
 
 Joined: 05 Jan 2008 Posts: 9486 Location: US: west coast, almost. Otherwise, enroute. 
  | 
		  
		    
			  
				Hmmmm... I would've thought 24 bytes of hex/bin zeroes would be 48 zeroes. _________________ I like deadlines. I like to wave as they pass by.
 
ב''ה
 
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | bobbee | 
		  
		    
			  
				 Posted: Fri Apr 05, 2019 4:47 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Knight
 
 Joined: 20 Sep 2001 Posts: 546 Location: Tampa 
  | 
		  
		    
			  
				me 2.
 
 
BTW, The customer just responded that they implemented this on their system and it worked. On to the next issue!! | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | hughson | 
		  
		    
			  
				 Posted: Fri Apr 05, 2019 1:27 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Padawan
 
 Joined: 09 May 2013 Posts: 1967 Location: Bay of Plenty, New Zealand 
  | 
		  
		    
			  
				
 
He was using 48 zeros, I said you only need 1. Thus 47 zeros are spare/redundant etc => "what's 47 zeros between friends".
 
 
   
	| bruce2359 wrote: | 
   
  
	| Hmmmm... I would've thought 24 bytes of hex/bin zeroes would be 48 zeroes. | 
   
 
 
It is, but you can simply use a single zero in MQSC keyword as a shorthand for the same.
 
 
 
   
	| bobbee wrote: | 
   
  
	| The customer just responded that they implemented this on their system and it worked. On to the next issue!! | 
   
 
 
Great news! _________________ Morag Hughson @MoragHughson
 
IBM MQ Technical Education Specialist
 
Get your IBM MQ training here!
 
MQGem Software | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |