ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » pub/sub command problem

Post new topic  Reply to topic
 pub/sub command problem « View previous topic :: View next topic » 
Author Message
asalema
PostPosted: Mon May 05, 2003 9:09 pm    Post subject: pub/sub command problem Reply with quote

Apprentice

Joined: 05 May 2003
Posts: 35

Hi All,

Can anyone show me what I am doing wrong here?

I have a flow as follows:

MQInput --> Compute -->MQOutput (SYSTEM.ADMIN.COMMAND.QUEUE)

I am trying to submit a subscription pub/sub command according to an incoming XML message
(e.g. <RegisterSubscription>
<Command>RegSub</Command>
<Topic>TOPIC1</Topic>
<QMgrName>MQSI_QM2</QMgrName>
<QName>OUT</QName>
<RegOpt>PersAsPub</RegOpt>
</RegisterSubscription> )

The command gets executed successfully but I don't receive any response (I need to receive the pscr folder). I DO set the msgType to request to make sure I receive a response but I don't. The strange thing is that I tried to submit the exact same command from the rfhutil.exe tool (which is part of ih03 supportpac) and it worked fine and I received the response with the pscr folder. So, there must be something that I am missing here. Can anyone figure out anything I am missing?.

Here is the esql code I am using:
===============================================DECLARE C INTEGER;
SET C = CARDINALITY(InputRoot.*[]);
DECLARE I INTEGER;
SET I = 1;
WHILE I < C DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I=I+1;
END WHILE;
-- Enter SQL below this line. SQL above this line might be regenerated,
causing any modifications to be lost.
--upadte the MQMD to receive a response
SET OutputRoot.MQMD.Format = 'MQHRF2 '
SET OutputRoot.MQMD.MsgType = MQMT_REQUEST;
SET OutputRoot.MQMD.ReplyToQ = 'BK_RESPONSE';
SET OutputRoot.MQMD.ReplyToQMgr= 'MQSI_SAMPLE_QM';
SET OutputRoot.MQMD.CodedCharSetId = 1208;


SET OutputRoot.MQRFH2.(MQRFH2.Field)Version = 2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format = 'MQSTR';
SET OutputRoot.MQRFH2.(MQRFH2.Field)NameValueCCSID = 1208;
SET OutputRoot.MQRFH2.(MQRFH2.Field)CodedCharSetId = 1208;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Encoding = 546;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Flags = 0;

SET OutputRoot.MQRFH2.psc.Command = InputBody.RegisterSubscription.Command;
SET OutputRoot.MQRFH2.psc.Topic = InputBody.RegisterSubscription.Topic;
SET OutputRoot.MQRFH2.psc.QMgrName =
InputBody.RegisterSubscription.QMgrName;
SET OutputRoot.MQRFH2.psc.QName = InputBody.RegisterSubscription.QName;
===============================================
Regards,
Amr
Back to top
View user's profile Send private message
cronydude
PostPosted: Mon May 05, 2003 10:36 pm    Post subject: Reply with quote

Voyager

Joined: 11 Nov 2001
Posts: 85
Location: US

Hi...
I could find two things:

1. The destination queue must be SYSTEM.BROKER.CONTROL.QUEUE

2. MQMD.Format must be set to 'MQRFH2' but not 'MQHRF2' (i guess it is a typo error)
_________________
Regs,
crony
IBM Certified Specialist - MQSeries
Back to top
View user's profile Send private message
granthmuk
PostPosted: Tue May 06, 2003 12:02 am    Post subject: Reply with quote

Apprentice

Joined: 16 May 2001
Posts: 38
Location: Edinburgh, Scotland

The queue is definitely wrong. The format looks right to me. When I specify this kind of thing I try to use the MQSeries constants e.g.
Code:
SET OutputRoot.MQMD.Format = MQFMT_RF_HEADER_2;
which gives a extra level of syntax checking. From the WMQ programming reference MQFMT_RF_HEADER_2 = 'MQHRF2' not 'MQRFH2'.
Back to top
View user's profile Send private message
asalema
PostPosted: Tue May 06, 2003 8:05 am    Post subject: pub/sub command problem Reply with quote

Apprentice

Joined: 05 May 2003
Posts: 35

Thanks a lot for your replies.


Sorry for the typo "SYSTEM.ADMIN.COMMAND.QUEUE" . I am using the "SYSTEM.BROKER.CONTROL.QUEUE" in the output node and the command is executed successfully, I just don't receive a response.

I did try to SET the MQMD.Format as follows:

SET OutputRoot.MQMD.Format = 'MQRFH2';

and

SET OutputRoot.MQMD.Format = MQFMT_RF_HEADER_2;

for everytime, I could still see the subscription from the subscription view (in the control center), but I don't receive any response on the BK_RESPONSE queue.

When I try using the rfhutil.exe tool (which is part of ih03 supportpac)

The MQMD.Format gets set to MQHRF2 and I can see the response on the queue!!!!!!!!, that's why I thought this is the proper value.

Do I have to set something in the OutputRoot.Properties folder?

Just guessing, I seem to have tried almost everything .

Thx again for your help
Amr
Back to top
View user's profile Send private message
vmcgloin
PostPosted: Tue May 06, 2003 8:56 am    Post subject: Reply with quote

Knight

Joined: 04 Apr 2002
Posts: 560
Location: Scotland

Hi,

I can't spot the problem with what you are doing but I too would rather use MQFMT_RF_HEADER_2 than the string value. And, have you tried directing both your message flow and rfhutil to a different queue so that you can examine the message using MQExplorer or another utility that will interpret the header for you? Then you can compare them and hopefully spot the problem.

Also, check the eventvwr or syslog and MQ logs for any problems with the reply queue.

Let us know when you get it working...
Back to top
View user's profile Send private message
asalema
PostPosted: Tue May 06, 2003 11:29 am    Post subject: pub/sub command problem Reply with quote

Apprentice

Joined: 05 May 2003
Posts: 35

Thanks again for the reply

I tried exactly what you mentioned. I put a trace node after the compute node and I used a test message flow with only input q -->trace node--> output q to trace the message from the support pac

I changed the esql code in the compute node to generate the exact same values (even with exact padding spaces ). I am still NOT receiving any response when usign my message flow.

Here is the trace file:

this message is from the support pac :

(
(0x1000000)Properties = (
(0x3000000)MessageSet = ''
(0x3000000)MessageType = ''
(0x3000000)MessageFormat = ''
(0x3000000)Encoding = 546
(0x3000000)CodedCharSetId = 1208
(0x3000000)Transactional = TRUE
(0x3000000)Persistence = FALSE
(0x3000000)CreationTime = GMTTIMESTAMP '2003-05-06 18:44:56.380'
(0x3000000)ExpirationTime = -1
(0x3000000)Priority = 0
(0x3000000)ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x3000000)ReplyProtocol = 'MQ'
(0x3000000)Topic = 'from rfhutil.exe tool'
)
(0x1000000)MQMD = (
(0x3000000)SourceQueue = 'TEST_IN'
(0x3000000)Transactional = TRUE
(0x3000000)Encoding = 546
(0x3000000)CodedCharSetId = 1208
(0x3000000)Format = 'MQHRF2 '
(0x3000000)Version = 2
(0x3000000)Report = 0
(0x3000000)MsgType = 1
(0x3000000)Expiry = -1
(0x3000000)Feedback = 0
(0x3000000)Priority = 0
(0x3000000)Persistence = 0
(0x3000000)MsgId = X'414d51204d5153495f53414d504c455f4dfbaf3e2000d61c'
(0x3000000)CorrelId = X'000000000000000000000000000000000000000000000000'
(0x3000000)BackoutCount = 0
(0x3000000)ReplyToQ = 'BK_RESPONSE '
(0x3000000)ReplyToQMgr = 'MQSI_SAMPLE_QM '
(0x3000000)UserIdentifier = 'amohamed '
(0x3000000)AccountingToken = X'16010515000000f36f93644115624c6868387beb03000000000000000000000b'
(0x3000000)ApplIdentityData = ' '
(0x3000000)PutApplType = 11
(0x3000000)PutApplName = 'my application'
(0x3000000)PutDate = DATE '2003-05-06'
(0x3000000)PutTime = GMTTIME '18:44:56.380'
(0x3000000)ApplOriginData = ' '
(0x3000000)GroupId = X'000000000000000000000000000000000000000000000000'
(0x3000000)MsgSeqNumber = 1
(0x3000000)Offset = 0
(0x3000000)MsgFlags = 0
(0x3000000)OriginalLength = -1
)
(0x1000000)MQRFH2 = (
(0x3000000)Version = 2
(0x3000000)Format = ' '
(0x3000000)Encoding = 546
(0x3000000)CodedCharSetId = 1208
(0x3000000)Flags = 0
(0x3000000)NameValueCCSID = 1208
(0x1000000)psc = (
(0x1000000)Command = (
(0x2000000) = 'RegSub'
)
(0x1000000)Topic = (
(0x2000000) = 'from rfhutil.exe tool'
)
(0x1000000)QMgrName = (
(0x2000000) = 'MQSI_MARCONI_QM2'
)
(0x1000000)QName = (
(0x2000000) = 'OUT'
)
)
)
)

this message is from my message flow:


(
(0x1000000)Properties = (
(0x3000000)MessageSet = ''
(0x3000000)MessageType = ''
(0x3000000)MessageFormat = ''
(0x3000000)Encoding = 546
(0x3000000)CodedCharSetId = 1208
(0x3000000)Transactional = TRUE
(0x3000000)Persistence = FALSE
(0x3000000)CreationTime = GMTTIMESTAMP '2003-05-06 19:11:26.530'
(0x3000000)ExpirationTime = -1
(0x3000000)Priority = 0
(0x3000000)ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x3000000)ReplyProtocol = 'MQ'
(0x3000000)Topic = 'from the message flow'
)
(0x1000000)MQMD = (
(0x3000000)SourceQueue = 'MQSI_INCOMMAND'
(0x3000000)Transactional = TRUE
(0x3000000)Encoding = 546
(0x3000000)CodedCharSetId = 1208
(0x3000000)Format = 'MQHRF2 '
(0x3000000)Version = 2
(0x3000000)Report = 0
(0x3000000)MsgType = 1
(0x3000000)Expiry = -1
(0x3000000)Feedback = 0
(0x3000000)Priority = 0
(0x3000000)Persistence = 0
(0x3000000)MsgId = X'414d51204d5153495f53414d504c455f4dfbaf3e2000d621'
(0x3000000)CorrelId = X'000000000000000000000000000000000000000000000000'
(0x3000000)BackoutCount = 0
(0x3000000)ReplyToQ = 'BK_RESPONSE '
(0x3000000)ReplyToQMgr = 'MQSI_SAMPLE_QM '
(0x3000000)UserIdentifier = 'amohamed '
(0x3000000)AccountingToken = X'16010515000000f36f93644115624c6868387beb03000000000000000000000b'
(0x3000000)ApplIdentityData = ' '
(0x3000000)PutApplType = 11
(0x3000000)PutApplName = 'st Message flows\rfhutil.exe'
(0x3000000)PutDate = DATE '2003-05-06'
(0x3000000)PutTime = GMTTIME '19:11:26.530'
(0x3000000)ApplOriginData = ' '
(0x3000000)GroupId = X'000000000000000000000000000000000000000000000000'
(0x3000000)MsgSeqNumber = 1
(0x3000000)Offset = 0
(0x3000000)MsgFlags = 0
(0x3000000)OriginalLength = -1
)
(0x1000000)MQRFH2 = (
(0x3000000)Version = 2
(0x3000000)Format = ' '
(0x3000000)NameValueCCSID = 1208
(0x3000000)CodedCharSetId = 1208
(0x3000000)Encoding = 546
(0x3000000)Flags = 0
(0x1000000)psc = (
(0x1000000)Command = (
(0x2000000) = 'RegSub'
)
(0x1000000)Topic = (
(0x2000000) = 'from the message flow'
)
(0x1000000)QMgrName = (
(0x2000000) = 'MQSI_MARCONI_QM2'
)
(0x1000000)QName = (
(0x2000000) = 'OUT'
)
)
)
)

Regards,
Amr
Back to top
View user's profile Send private message
asalema
PostPosted: Tue May 06, 2003 12:14 pm    Post subject: pub/sub command problem Reply with quote

Apprentice

Joined: 05 May 2003
Posts: 35

I got it running now, I set the replytoq and replytoqmgr in the output node and I set the message to request in the output node, and that worked fine.

Thanks for your help again.
Back to top
View user's profile Send private message
michaelpatton
PostPosted: Fri May 09, 2003 12:25 am    Post subject: responses for PubSub commands Reply with quote

Apprentice

Joined: 21 May 2002
Posts: 25
Location: East Coast USA

When using PubSub commands, you can also obtain the broker response without configuring an output node to reply to a queue by setting the MQMD.ReplyToQ to point to a specific queue, AND the MQMD.MsgType equal to one of the following:
MQMT_REQUEST, if you want a response for every pubsub command to be generated
MQMT_DATAGRAM, which will generate a message based on flags set in the MQMD.Report field
The MQMD.Report field can have the following values:
MQRO_PAN, if you want messages only if the command is successful
MQRO_NAN, if you want messages only if the command fails.

for example,
SET MQMD.ReplyToQ = PUBSUB.RESPONSE.QUEUE;
SET MQMD.MsgType = MQMT_REQUEST;
will generate a message for each and every pub sub command and put that message on the PUBSUB.RESPONSE.QUEUE

SET MQMD.ReplyToQ = PUBSUB.RESPONSE.QUEUE;
SET MQMD.Report = MQRO_NAN;
SET MQMD.MsgType = MQMT_DATAGRAM;

will generate a message for each failed pub sub command and put that message on the PUBSUB.RESPONSE.QUEUE,

In the compute node that sets all these attributes, do not forget to pass along ALL in the advanced tab, so the entire header information is used in nodes down the line.
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » pub/sub command problem
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.