Author |
Message
|
sjalili |
Posted: Tue May 22, 2007 6:43 am Post subject: Publish/Subscribe |
|
|
Newbie
Joined: 22 May 2007 Posts: 4
|
Hi,
I have published a topic and I can subscribe to the topic easily through RFHUtil. But when I try my message flow withm following code in compute node, it doesn't work. I can not subscribe to the topic.
in the message flow of my subscriber I have an input node with the queue of SYSTEM.BROKER.CONTROL.QUEUE and a compute node and an output node.
For requesting the subscribe, I am writing following xml into the SYSTEM.BROKER.CONTROL.QUEUE.
<psc>
<Command>RegSub</Command>
<RegOpt>PubOnReqOnly</RegOpt>
<RegOpt>CorrelAsId</RegOpt>
<Topic>Test/#</Topic>
</psc>
I am wondering what RFHUtil does that I am not doing that.
Is there anything that I am missing?
Here is my subscriber:
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 = 'Test'||'/'||BrokerName||'/'||ExecutionGroupLabel||'/'||MessageFlowLabel;
SET OutputRoot.MQRFH2.psc.RegOpt[1] = 'FullResp';
SET OutputRoot.MQRFH2.psc.RegOpt[2] = 'CorrelAsId';
SET OutputRoot.MQRFH2.psc.QMgrName = 'VXDAP004';
SET OutputRoot.MQRFH2.psc.QName = 'PUB.SEND';
SET OutputRoot.MQMD.MsgType = 1;
--this is hardcoded temporarily
SET OutputRoot.MQMD.ReplyToQ = 'BROKER.REPLY';
SET OutputRoot.MQMD.CorrelId = InputRoot.MQMD.CorrelId;
SET OutputRoot.XMLNS.ArchMessage.Data = InputRoot.XMLNS.Publication.Data;
SET OutputRoot.MQRFH2.usr=OutputRoot.XMLNSC;
DELETE FIELD OutputRoot.XMLNSC;
-- copy original message body
SET OutputRoot.BLOB = InputBody;
here is my publisher
CALL CopyMessageHeaders();
SET OutputRoot.MQMD.MsgType = 1;
SET OutputRoot.MQMD.ReplyToQ = 'BROKER.REPLY';
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 = 'Test'||'/'||BrokerName||'/'||ExecutionGroupLabel||'/'||MessageFlowLabel;
SET OutputRoot.XMLNS.ArchMessage.Data = InputRoot.XMLNS.Publication.Data;
SET OutputRoot.MQRFH2.usr=OutputRoot.XMLNSC;
DELETE FIELD OutputRoot.XMLNSC;
-- copy original message body
SET OutputRoot.BLOB = InputBody; |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue May 22, 2007 1:17 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Are you on version 6.0.0.3 of the broker and 6.0.2.x of the qmgr ?? _________________ MQ & Broker admin |
|
Back to top |
|
 |
sjalili |
Posted: Tue May 22, 2007 1:22 pm Post subject: |
|
|
Newbie
Joined: 22 May 2007 Posts: 4
|
Here are the versions I am using:
MQ Server
Version: 6.0
WebSphere Message Brokers Toolkit - Message Broker
Version: 6.0.2 |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue May 22, 2007 1:24 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
sjalili wrote: |
Here are the versions I am using:
MQ Server
Version: 6.0
WebSphere Message Brokers Toolkit - Message Broker
Version: 6.0.2 |
You need to upgrade your versions...
The toolkit does not publish the messages... or hold the subscriptions the broker does... _________________ MQ & Broker admin |
|
Back to top |
|
 |
sjalili |
Posted: Tue May 22, 2007 1:29 pm Post subject: |
|
|
Newbie
Joined: 22 May 2007 Posts: 4
|
What versions do I need to use?
And how comes that it works with RFHUtil? I was able to subscribe to a topic through RFHUtil.
The version that I am using is 4.2.0.
Thanks. |
|
Back to top |
|
 |
kavitam |
Posted: Mon Sep 01, 2008 11:32 pm Post subject: Publish/Subscribe |
|
|
Novice
Joined: 07 May 2008 Posts: 24
|
we are also facing the same issue.
i am using the following code to assign topic
SET OutputRoot.MQRFH2.psc.Topic = Trim(InputRoot.XML.psc.Topic);
but the issue is that the topic field is assigned to NULL, even though i hardcode that.
Also the user trace shows properly that the value is getting assigned |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Sep 02, 2008 3:44 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
fjb_saper wrote: |
Are you on version 6.0.0.3 of the broker and 6.0.2.x of the qmgr ?? |
I consider those to be the minimum versions for pub/sub to work correctly with the broker. _________________ MQ & Broker admin |
|
Back to top |
|
 |
kavitam |
Posted: Thu Sep 04, 2008 10:37 pm Post subject: Publish/Subscribe |
|
|
Novice
Joined: 07 May 2008 Posts: 24
|
I am using the required version.
MQ - 6.0.2.2
MB - 6.0.6
The issue is resovled. The request message have HTTP headers.
We were copying message headers first and then put HTTP header as NULL and processing the rest message(Creating MQRFH2 header and copying rest fields).
But we need to create entire new message instead of copying headers from the message. |
|
Back to top |
|
 |
AkankshA |
Posted: Thu Sep 04, 2008 11:01 pm Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
@moved to WMB forum. _________________ Cheers |
|
Back to top |
|
 |
|