Author |
Message
|
Vinod.K |
Posted: Wed Jun 27, 2007 10:22 pm Post subject: Unable to put message( WebSphere MQ/MB-Pub/Sub) |
|
|
Newbie
Joined: 16 May 2007 Posts: 5
|
Hi
I am unable to get message in the Queue(i.e SYSTEM.BROKER.CONTROL.QUEUE) .
When I am posting 'Topic' message for the subscription queue to in the queue, the message it is kept with the Queue itself. |
|
Back to top |
|
 |
jsware |
Posted: Wed Jun 27, 2007 11:50 pm Post subject: Re: Unable to put message( WebSphere MQ/MB-Pub/Sub) |
|
|
 Chevalier
Joined: 17 May 2001 Posts: 455
|
Vinod.K wrote: |
Hi
I am unable to get message in the Queue(i.e SYSTEM.BROKER.CONTROL.QUEUE) .
When I am posting 'Topic' message for the subscription queue to in the queue, the message it is kept with the Queue itself. |
I don't think that the SBCQ is the correct queue. We created a simple flow MQInput->Publish and had MQInput get from a queue called SYSTEM.BROKER.DEFAULT.STREAM.
Deploy the flow and publish to the SBDS queue. This works fine for us.
You can even insert a trace node to idicate what you have published. _________________ Regards
John
The pain of low quaility far outlasts the joy of low price. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jun 28, 2007 12:17 am Post subject: Re: Unable to put message( WebSphere MQ/MB-Pub/Sub) |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Vinod.K wrote: |
Hi
I am unable to get message in the Queue(i.e SYSTEM.BROKER.CONTROL.QUEUE) .
When I am posting 'Topic' message for the subscription queue to in the queue, the message it is kept with the Queue itself. |
Don't quite get the question. Are you saying that when you publish information for a given topic, the information is not being placed on the subscriber's queue? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mymq |
Posted: Tue Jul 17, 2007 10:03 am Post subject: |
|
|
Centurion
Joined: 01 Mar 2007 Posts: 101 Location: US-Greenwille
|
Though i am not sure what are u looking for still:
I can give you a sample code for both PUB and SUB flows:
Publish Flow:
---------------
MQInputNode---->Compute Node ---->Publish Node
ESQL in Compute Node:
CREATE COMPUTE MODULE Pub_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyMessageHeaders();
CALL CopyEntireMessage();
SET OutputRoot.MQRFH2.psc."Command" = 'Publish';
SET OutputRoot.MQRFH2.psc.Topic = 'MYTOPIC';
RETURN TRUE;
END;
CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER 1;
DECLARE J INTEGER CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;
CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
END;
END MODULE;
Subscribe Flow:
------------------
MQInputNode(SUBQ) -- >Compute Node ---->OutputQ
ESQL in Compute Node:
CREATE COMPUTE MODULE Sub17A_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyMessageHeaders();
-- CALL CopyEntireMessage();
SET OutputRoot.MQRFH2.psc.Command = 'RegSub';
SET OutputRoot.MQRFH2.psc.Topic = 'MYTOPIC';
SET OutputRoot.MQRFH2.psc.QMgrName = 'MYQM';
SET OutputRoot.MQRFH2.psc.QName = 'MYSUBQ';
RETURN TRUE;
END;
CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER 1;
DECLARE J INTEGER CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;
CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
END;
END MODULE;
Create a Subscription Rule
------------------------------
using RFHUtil by giving Topic name, and Subscribe Queue Name. _________________ --SRK-- |
|
Back to top |
|
 |
dilse |
Posted: Tue Jul 17, 2007 1:14 pm Post subject: |
|
|
 Master
Joined: 24 Jun 2004 Posts: 270
|
Quote: |
I am unable to get message in the Queue(i.e SYSTEM.BROKER.CONTROL.QUEUE) . |
You will not get the message in the Queue 'SYSTEM.BROKER.CONTROL.QUEUE' instead you have to prepare the 'Register Subscribers(RegSub)' command and send that to 'SYSTEM.BROKER.CONTROL.QUEUE' for registering the subscribers to a specific Topic.
Quote: |
When I am posting 'Topic' message for the subscription queue to in the queue, the message it is kept with the Queue itself. |
You will prepare the Publish command with 'Topic' information, the data to be sent and send it to the 'Publish' node. This will be your last node in the publish flow. Publish node will then look for the subscribers of this Topic and sends the information to all the subscribers (have to pass the condition if there is a filter on subscription).
You can follow 'mymq' suggestion for coding purpose but do not forget to assign the 'Format' field in MQMD to 'MQFMT_RF_HEADER_2' as he did in his code.
Hope this helps!! Good luck.
DilSe... |
|
Back to top |
|
 |
pdrabik |
Posted: Mon Sep 17, 2007 4:32 am Post subject: |
|
|
Apprentice
Joined: 29 Sep 2006 Posts: 31 Location: poland
|
could you please include exact configuration of mqIn/Out-put nodes ?
Still, i cant understand why no subscriber, and no publisher is registered to me.
I'm sending publish and subscribe command to SYSTEM.BROKER.CONTROL.QUEUE. Im configuring that command with MQRFH2 header, then I send this message to SBCQ (with MQOutput node). Now, as i understand, that should be subscriber registered, and viewable in Domains> Subscriptions.
Pls contact me.
Regards. _________________ ---
cc: poltreak@o2.pl |
|
Back to top |
|
 |
|