|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
deregister a subscriber |
« View previous topic :: View next topic » |
Author |
Message
|
mrgate |
Posted: Wed Jun 27, 2007 6:42 am Post subject: deregister a subscriber |
|
|
 Centurion
Joined: 28 Feb 2007 Posts: 141 Location: India
|
Hi all,
I am using message broker version6.0 on windows 2000 platform. I have created a message flow project which includes three flows.
first flow is publisher flow:
mqinput(queue is PUBLISHER.INPUT)--->compute node--->publication node.
in this flow the input is of xml data and code in compute node is:
set OutputRoot.MQMD.ReplyToQ='RTOQ';
set OutputRoot.MQMD.Format=MQFMT_RF_HEADER_2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Version=2;
set OutputRoot.MQRFH2.(MQRFH2.Field)Format='MQSTR';
SET OutputRoot.MQRFH2.(MQRFH2.Field)NameValueCCSID=1208;
SET OutputRoot.MQRFH2.psc.Command='Publish';
SET OutputRoot.MQRFH2.psc.Topic=InputRoot.XML.Publish.topic;
SET OutputRoot.XML.DATA=InputRoot.XML.Publish.data;
the second flow is subscriber flow:
mqinput(queue is SUBSCRIBER.INPUT)--->compute node--->mqoutput node(queue is SYSTEM.BROKER.CONTROL.QUEUE)
code in subscribers flow compute node is:
SET OutputRoot.MQMD.Format=MQFMT_RF_HEADER_2;
--SET OutputRoot.MQMD.CorrelId=A;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Version=2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format='MQSTR';
SET OutputRoot.MQRFH2.(MQRFH2.Field)NameValueCCSID=1208;
SET OutputRoot.MQRFH2.psc.Command='RegSub';
SET OutputRoot.MQRFH2.psc.Topic=InputRoot.XML.topic;
--SET OutputRoot.MQRFH2.psc.RegOpt='CorrelAsId';
SET OutputRoot.MQRFH2.psc.QMgrName='WBRK6_DEFAULT_QUEUE_MANAGER';
SET OutputRoot.MQRFH2.psc.QName='PUBLISHEDINFO';
third flow is subscribers deregister flow :
mqinput(queue is DEREGSUBSCRIBER.INPUT)--->compute node--->mqoutput node(queue is SYSTEM.BROKER.CONTROL.QUEUE)
code in compute node is:
SET OutputRoot.MQMD.Format=MQFMT_RF_HEADER_2;
--SET OutputRoot.MQMD.CorrelId=A;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Version=2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format='MQSTR';
SET OutputRoot.MQRFH2.(MQRFH2.Field)NameValueCCSID=1208;
SET OutputRoot.MQRFH2.psc.Command='DeregSub';
SET OutputRoot.MQRFH2.psc.Topic=InputRoot.XML.topic;
SET OutputRoot.MQRFH2.psc.RegOpt='CorrelAsId';
SET OutputRoot.MQRFH2.psc.QMgrName='WBRK6_DEFAULT_QUEUE_MANAGER';
SET OutputRoot.MQRFH2.psc.QName='PUBLISHEDINFO';
In the documentation, I have seen that whenever we are subscribing to a particular topic we should include the correlid of mqmd in the psc service folder so that whenever we are deregistering a subscriber, we should pass the matching correlation id of the subscriber to deregister a subscriber.
now what is the problem is that topic is being subscribed in the broker and the data is not being unscribed from the broker can anyone give me the reason for this. |
|
Back to top |
|
 |
wbi_telecom |
Posted: Wed Jun 27, 2007 11:30 am Post subject: |
|
|
 Disciple
Joined: 15 Feb 2006 Posts: 188 Location: Harrisburg, PA
|
Instead of having the 3rd flow, could you not use the second flow to register as well as deregister the subscription by making the value of Command also a part of input XML (like the topic)?
Also can you send the subscription messages as Resquest messages and define a ReplytoQueue in MQMD so that broker will respond back with RFH2 header telling you the reason code why the deregistration is not happening.
Cheers, |
|
Back to top |
|
 |
mrgate |
Posted: Thu Jun 28, 2007 2:10 am Post subject: |
|
|
 Centurion
Joined: 28 Feb 2007 Posts: 141 Location: India
|
Thanks mr wbi_telecom, now its working. I have deleted the third flow and have sent the command as input from the same flow. but I have not included the replytoq of mqmd header but it is working properly can you tell me the reason why this is happening because I have used the same code in the two flows but after deleting the third flow i have just kept a simple logic in the second flow esql. |
|
Back to top |
|
 |
wbi_telecom |
Posted: Thu Jun 28, 2007 9:37 am Post subject: |
|
|
 Disciple
Joined: 15 Feb 2006 Posts: 188 Location: Harrisburg, PA
|
If the same request message works with the second flow and not with the third indicates that the thirmd message flow was creating the derigister message wrongly. The exact error will only be found if you request a reply from the broker. If you are interested in debugging please do as I had suggested in my previous mail and do MQRC to the reason code you get.
Anyways now that its working and you also have one less flow to worry about ....I think you are good to go.
Cheers, |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|