Author |
Message
|
nmaddisetti |
Posted: Thu May 05, 2005 9:31 am Post subject: how to publish a message from the flow |
|
|
Centurion
Joined: 06 Oct 2004 Posts: 145
|
Hi all
i know how to publish and subscribe messages to the broker using JMS programs based on topics
now i want to publish a message which is comming from a flow
should i write a custom node which includes the JMS code for publish
or is there any other possibilty
thanks
nmaddisetti |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu May 05, 2005 9:53 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Have you considered using a Publication node? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
nmaddisetti |
Posted: Thu May 05, 2005 10:28 am Post subject: |
|
|
Centurion
Joined: 06 Oct 2004 Posts: 145
|
Hi
we will use publication node after
MQInput node or RealtimeInput node
my question is my mesage was not yet published
i want to publish from the flow where i have message
thanks
nmaddisetti |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu May 05, 2005 10:38 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I don't understand.
You can put a publication node in any flow. Then it will publish the message you tell it to publish.
Most of the examples of using the publication node assume that it is in a standalone flow that will examine an incoming message for the topic, do some formatting, and then publish the message. This flow then acts as a publishing service for other flows - they can put any message to that flow's input and not know about the publication process.
But you can put a publication node in any flow. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
vennela |
Posted: Thu May 05, 2005 10:40 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
jefflowrey wrote: |
Have you considered using a Publication node? |
I thought that answered your question.
What are you trying to do?
@jeff:
your post wasn't there when I started writing. |
|
Back to top |
|
 |
nmaddisetti |
Posted: Thu May 05, 2005 11:46 am Post subject: |
|
|
Centurion
Joined: 06 Oct 2004 Posts: 145
|
Hi
iam getting message from compute node in the flow
after compute node if i place publication node
then on what topic it will be publiched
i have seen publication node properties and gone through help center
is subscription point means topic name ?
tell me a little bit more
thanks
nmaddisetti |
|
Back to top |
|
 |
maha20 |
Posted: Thu May 05, 2005 12:10 pm Post subject: |
|
|
 Voyager
Joined: 23 Sep 2003 Posts: 79
|
Hi-
You can publish a message using 3 diffn options -
1. Name the topic you want to publish in the INPUT Q node in the default section
2. You can use RFH2 header to publish using mcd floder
3. In case you don't have RFH2 header you can just set the topic in ESQL Root.Properties.Topic = xxx (which is same as 1 above).
Subscription point is used in other context. _________________ IBM Certified System Administrator -WMQ V5.3
SCJP 1.4 |
|
Back to top |
|
 |
malammik |
Posted: Thu May 05, 2005 1:01 pm Post subject: |
|
|
 Partisan
Joined: 27 Jan 2005 Posts: 397 Location: Philadelphia, PA
|
Just pipe this into publish node.
CREATE COMPUTE MODULE ProcessPublication
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
--CALL CopyMessageHeaders();
--CALL CopyEntireMessage();
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 = InputRoot.XMLNS.Publication.TopicName;
SET OutputRoot.XMLNS.ArchMessage.Data = InputRoot.XMLNS.Publication.Data;
RETURN TRUE;
END; _________________ Mikhail Malamud
http://www.netflexity.com
http://groups.google.com/group/qflex |
|
Back to top |
|
 |
nmaddisetti |
Posted: Fri May 06, 2005 6:06 am Post subject: |
|
|
Centurion
Joined: 06 Oct 2004 Posts: 145
|
Hi all
i was able to publish the message to the broker
now i want to make another flow as subscriber to that particular topic
then what will be the input node in that flow
thanks
nmaddisetti |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri May 06, 2005 6:11 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
nmaddisetti wrote: |
Hi all
i was able to publish the message to the broker
now i want to make another flow as subscriber to that particular topic
then what will be the input node in that flow
thanks
nmaddisetti |
You will have to register the subscriber with a subscription request message. That message will specify the topic. It will also specify a ReplyToQueue in the MQMD. That ReplyToQueue will be the queue that subscriptions will be published to.
So you need an MQInput node to start your subscriber.
ftp://ftp.software.ibm.com/software/integration/wbibrokers/docs/messagebroker_Publish_Subscribe.pdf _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
malammik |
Posted: Fri May 06, 2005 6:23 am Post subject: |
|
|
 Partisan
Joined: 27 Jan 2005 Posts: 397 Location: Philadelphia, PA
|
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.ArchMessage.TopicName;
SET OutputRoot.MQRFH2.psc.RegOpt[1] = 'FullResp';
SET OutputRoot.MQRFH2.psc.RegOpt[2] = 'CorrelAsId';
SET OutputRoot.MQRFH2.psc.QName = 'PUBSUB.PROXY.OUT';
SET OutputRoot.MQMD.MsgType = 1;
--this is hardcoded temporarily
SET OutputRoot.MQMD.ReplyToQ = 'BROKER.REPLY';
SET OutputRoot.MQMD.CorrelId = InputRoot.MQMD.CorrelId; _________________ Mikhail Malamud
http://www.netflexity.com
http://groups.google.com/group/qflex |
|
Back to top |
|
 |
nmaddisetti |
Posted: Fri May 06, 2005 9:03 am Post subject: |
|
|
Centurion
Joined: 06 Oct 2004 Posts: 145
|
Hi malammik
iam not getting anything in reply to queue
the code iam using is what you have given
thanks
nmaddisetti |
|
Back to top |
|
 |
malammik |
Posted: Fri May 06, 2005 9:37 am Post subject: |
|
|
 Partisan
Joined: 27 Jan 2005 Posts: 397 Location: Philadelphia, PA
|
|
Back to top |
|
 |
malammik |
Posted: Fri May 06, 2005 9:39 am Post subject: |
|
|
 Partisan
Joined: 27 Jan 2005 Posts: 397 Location: Philadelphia, PA
|
|
Back to top |
|
 |
jefflowrey |
Posted: Fri May 06, 2005 10:22 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
nmaddisetti wrote: |
Hi malammik
iam not getting anything in reply to queue
the code iam using is what you have given
thanks
nmaddisetti |
Also make sure that you change Mikhails code so that it actually subscribes to YOUR topic, rather than to InputRoot.XMLNS.Publication.TopicName.
And make sure that you change Mikhail's code so that it specifies YOUR subscription queue, rather than BROKER.REPLY. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|