Author |
Message
|
flemmingpoulsen |
Posted: Tue Aug 24, 2010 11:25 pm Post subject: Publication |
|
|
Newbie
Joined: 24 Aug 2010 Posts: 8
|
Hi
Im trying to publish a message using publication node in message brokeer 6.1.0.5
Im a rookie and proberly have something mixed up, but I would be pleased if someone could help me on the way of setting up a simple scenario.
A flow reads from an input queue SYSTEM.BROKER.DEFAULT.STREAM
A compute node does : Set OutputRoot.Properties.Topic='orange';
The flow ends with a publication node
On my queuemgr MQ explorer (7.0) I have subscriber FRUITS with topic string 'orange'
But the message disappers?
Hope someone will supply me with a hint on the missing links.
regards Flemming |
|
Back to top |
|
 |
rbicheno |
Posted: Wed Aug 25, 2010 12:56 am Post subject: |
|
|
Apprentice
Joined: 07 Jul 2009 Posts: 43
|
If you are using MQv7 then you dont even need to use WMB for topic based PubSub, as it comes with a built in pub sub engine. You can test this easily in MQExplorer by creating a topic and subscription in the GUI and then even send a test publication. Should be lots in the MQv7 docs around this.
If you think you need to use WMBv6.1 then you need to read this: http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/topic/com.ibm.etools.mft.doc/ae61500_.htm
BTW as a rule i wouldnt use a SYSTEM* queue as input to a flow! as they are not for general use! |
|
Back to top |
|
 |
flemmingpoulsen |
Posted: Wed Aug 25, 2010 1:13 am Post subject: |
|
|
Newbie
Joined: 24 Aug 2010 Posts: 8
|
thanks for your answer.
I want to use the message broker, either by using the publication node or by putting to a queue on the queuemgr and having the queuemgr distributing the message.
1) I need to create the topic string dynamically in the flow. (orange)
2) Publish it to a subscriber matching the topic string (or+).
But I cant get either of the solutions to work, I can get to work by using the test function on the queuemgr as you propose.
regards Flemming |
|
Back to top |
|
 |
Luke |
Posted: Wed Aug 25, 2010 1:50 am Post subject: |
|
|
Centurion
Joined: 10 Nov 2008 Posts: 128 Location: UK
|
Hi,
Does your input message have an MQRFH2 header? If so, are you propagating it and setting the relevant fields correctly? If there's no MQRFH2 header on the input message, I think you need to create an MQRFH2 in the flow and set the relevant fields before passing to either the publication node or the MQ pub/sub queue.
Your subscription will need to be with the engine you've decided to use too I guess, as per the link from rbicheno. |
|
Back to top |
|
 |
rbicheno |
Posted: Wed Aug 25, 2010 3:21 am Post subject: |
|
|
Apprentice
Joined: 07 Jul 2009 Posts: 43
|
Spot on, after the input node if you dont have the right rhf2 already in the message you will need to create it like below:
-- Copy the original message and send it as a Publication
CALL CopyEntireMessage();
-- Create the fields in the RFH2 Header
CREATE FIELD OutputRoot.MQRFH2.psc.Command;
CREATE FIELD OutputRoot.MQRFH2.psc.Topic;
-- Set their values
SET OutputRoot.MQRFH2.psc.Command = 'Publish';
SET OutputRoot.MQRFH2.psc.Topic = 'orange';
Took this from the JMS Nodes Sample which does similar to what you want. |
|
Back to top |
|
 |
flemmingpoulsen |
Posted: Wed Aug 25, 2010 6:19 am Post subject: |
|
|
Newbie
Joined: 24 Aug 2010 Posts: 8
|
Thanks for your advice.
I have a subscriber with a topic string = orange that I have created on my queuemgr via mq explorer.
It still doesent work although I can see that the message looks alright just before it hits the publication node.
Could it be because the information about the subscriber should be applied to some internal configuration mgr?
Is there a way to test it, debug? |
|
Back to top |
|
 |
joebuckeye |
Posted: Wed Aug 25, 2010 6:39 am Post subject: |
|
|
 Partisan
Joined: 24 Aug 2007 Posts: 365 Location: Columbus, OH
|
|
Back to top |
|
 |
rbicheno |
Posted: Wed Aug 25, 2010 7:07 am Post subject: |
|
|
Apprentice
Joined: 07 Jul 2009 Posts: 43
|
I suspect your subscriber via MQExplorer will be registered with the MQ Pubsub engine. By default your flow will be publishing into the WMB PubSub engine, hence they will not match up. Did you read the doc link i sent? If you wish to use the v7 MQ pubsub engine you will need disable the WMB pubsub engine, the doc link i posted has a link showing how to do this.
Thankfully the story is much simpler for WMB v7 where WMB utilises the MQ engine only. |
|
Back to top |
|
 |
flemmingpoulsen |
Posted: Wed Aug 25, 2010 10:54 pm Post subject: |
|
|
Newbie
Joined: 24 Aug 2010 Posts: 8
|
Thanks for your help im very gratefull.
I have disabled the broker pub/sub engine
Now, the message lands on the dead letter q and I get this error, taken from a debug session:
Text:CHARACTER:Publication node disabled
Cant I use the publication node against the queuemgr pub/sub? As I read the doc it should be that way automatically after disabling the broker pub. I have restarted everything but get the same error.
Do you have any experience that could help me? |
|
Back to top |
|
 |
|