How to use Publication Node to publish to an MQ Queue? - Websphere

This is a discussion on How to use Publication Node to publish to an MQ Queue? - Websphere ; Hi, I am trying to change a Publication node to publish to an MQ Queue. Can this be done, can a topic be a jms/Queue or an MQQueue? I am referencing the "JMS Nodes Sample" which comes with WMB v6.0....

+ Reply to Thread
Results 1 to 5 of 5

Thread: How to use Publication Node to publish to an MQ Queue?

  1. How to use Publication Node to publish to an MQ Queue?

    Hi,

    I am trying to change a Publication node to publish to an MQ Queue. Can
    this be done, can a topic be a jms/Queue or an MQQueue? I am referencing
    the "JMS Nodes Sample" which comes with WMB v6.0.



  2. Re: How to use Publication Node to publish to an MQ Queue?

    When WMB publishes messages, they will get sent to (MQPUT to) a list of 0-n
    MQ queues that have been previously subscribed. I'm not quite sure what you
    mean therefore by "changing a Publication node to an MQ Queue.

    From a MQ point of view, jms is justs an API on top of the standard MQ API.
    So if your WMB broker publishes to any queue, then a JMS receiving
    application can certainly receive the messages using standard JMS calls,
    just as standard JMS applications can be written to send the messages to the
    publication motor (WMB in this case).

    Sorry, but I don't have the WMB v6.0 "JMS Nodes Sample" in front of me to
    check, but I suspect that it probably shows you how to receive/send messages
    using JMS Nodes instead of the more traditional MQ nodes (MQInput/MQOutput).
    The main difference in using JMS Nodes is that it lets you use whatever JMS
    classes and JMS implementation you want. For instance, this might be
    particularly useful if you were using Sun's JMS and you wanted to have the
    Sun messaging send a message to the MQ world (or vice-versa). Of course,
    the JMS implementation might be IBM's MQ (or IBM's WAS or Tibco or.....)
    also.

    The WMB JMS Nodes (again, like the MQ nodes MQInput/MQOutput) generally
    expect the developper to pre-assign a queue destination when he develops the
    flow. In other words, it's usually static. It's not going to be
    dynamically set by the Broker (there are exceptions). This is in contrast
    to using the Pub/Sub feature of the Broker whereby it maintains the list of
    subscribed queues and uses that list to dynamically set destinations, which
    is the function of the Publication node.

    So, if you really don't want to use the WMB Publication node (and its
    underlying publication list and motor) to do the distribution (publication)
    but would rather use some other "downstream" motor to do the pulication,
    then you could use a JMSOutput node at the end of your flow and send the
    message to the JMS implementation downstream to handle publicizing the
    message.

    Hope this helps.

    --
    Carl



  3. Re: How to use Publication Node to publish to an MQ Queue?

    Hi,

    Thanks for your explanation. My question is how to configure the WMB
    Publication node to send the publications to MQ Queues, and the subscribers
    would be reading published messages from these queues. Do I have to set
    something in the RFH2 header or MQMD or someting else?


    "Carl Farkas" wrote in message
    news:fmdm3k$1j838$1@news.boulder.ibm.com...
    > When WMB publishes messages, they will get sent to (MQPUT to) a list of
    > 0-n MQ queues that have been previously subscribed. I'm not quite sure
    > what you mean therefore by "changing a Publication node to an MQ Queue.
    >
    > From a MQ point of view, jms is justs an API on top of the standard MQ
    > API. So if your WMB broker publishes to any queue, then a JMS receiving
    > application can certainly receive the messages using standard JMS calls,
    > just as standard JMS applications can be written to send the messages to
    > the publication motor (WMB in this case).
    >
    > Sorry, but I don't have the WMB v6.0 "JMS Nodes Sample" in front of me to
    > check, but I suspect that it probably shows you how to receive/send
    > messages using JMS Nodes instead of the more traditional MQ nodes
    > (MQInput/MQOutput). The main difference in using JMS Nodes is that it lets
    > you use whatever JMS classes and JMS implementation you want. For
    > instance, this might be particularly useful if you were using Sun's JMS
    > and you wanted to have the Sun messaging send a message to the MQ world
    > (or vice-versa). Of course, the JMS implementation might be IBM's MQ (or
    > IBM's WAS or Tibco or.....) also.
    >
    > The WMB JMS Nodes (again, like the MQ nodes MQInput/MQOutput) generally
    > expect the developper to pre-assign a queue destination when he develops
    > the flow. In other words, it's usually static. It's not going to be
    > dynamically set by the Broker (there are exceptions). This is in contrast
    > to using the Pub/Sub feature of the Broker whereby it maintains the list
    > of subscribed queues and uses that list to dynamically set destinations,
    > which is the function of the Publication node.
    >
    > So, if you really don't want to use the WMB Publication node (and its
    > underlying publication list and motor) to do the distribution
    > (publication) but would rather use some other "downstream" motor to do the
    > pulication, then you could use a JMSOutput node at the end of your flow
    > and send the message to the JMS implementation downstream to handle
    > publicizing the message.
    >
    > Hope this helps.
    >
    > --
    > Carl
    >




  4. Re: How to use Publication Node to publish to an MQ Queue?

    Oh, sorry Doru... I thought that your question was more complicated.

    You don't "configure" the Publication node to send publications to MQ
    Queues. This node is... ah... self-configuring. In other words,
    applications normally send a "control message" (MQ message with a very
    specific format) to the Broker to add Subscriptions. A subscription
    essentially consists of a Topic (what subject is subcribed) and a "target"
    which consists of a queue name and queue manager name. This control
    message should be sent to the queue SYSTEM.BROKER.CONTROL.QUEUE on the
    Broker's QM. The Broker monitors this queue, and modifies its subscription
    list accordingly.

    The following "pseudo-code" shows you an example of the headers:

    MQMD
    MSGTYPE 1
    REPLYTOQ Ack
    ENCODING 546
    CODEDCHARSETID 437
    FORMAT MQHRF2

    MQRFH2
    CODEDCHARSETID 437
    NAMEVALUECCSID 437
    NAMEVALUEDATA
    STARTDATA

    RegSub
    Vins/Francais/#
    Test

    ENDDATA
    TESTEND

    So, yes, an RFH2 is necessary because this is where the "meta language" is
    found that instructs the Broker to register a subscription. In this case,
    it's registering a subcription for all messages that are subsequently
    published to the topic "Vins/Francais/*", and the queue named Test (at the
    local queue manager as none is explicitly stated) is subscribed.
    Incidentally, if you write your application to do the subscription using
    JMS, then if you set the parameters correctly, JMS should take care of
    setting up the RFH2 headers for you.

    This is all documented in theWMBv61 messagebroker_Publish_Subscribe.pdf
    manual that you can download at
    http://www-306.ibm.com/software/inte...roker/library/ (or
    read it in the online manual delivered with the Broker Toolkit. Look in the
    "Subscribing" section.

    Hope this helps more!
    --
    Carl



  5. Re: How to use Publication Node to publish to an MQ Queue?

    Carl, thanks for the great explanation. This was exactly what I needed to
    know.

    Regards,

    Doru

    "Carl Farkas" wrote in message
    news:fmhmrk$1mg58$1@news.boulder.ibm.com...
    > Oh, sorry Doru... I thought that your question was more complicated.
    >
    > You don't "configure" the Publication node to send publications to MQ
    > Queues. This node is... ah... self-configuring. In other words,
    > applications normally send a "control message" (MQ message with a very
    > specific format) to the Broker to add Subscriptions. A subscription
    > essentially consists of a Topic (what subject is subcribed) and a "target"
    > which consists of a queue name and queue manager name. This control
    > message should be sent to the queue SYSTEM.BROKER.CONTROL.QUEUE on the
    > Broker's QM. The Broker monitors this queue, and modifies its
    > subscription list accordingly.
    >
    > The following "pseudo-code" shows you an example of the headers:
    >
    > MQMD
    > MSGTYPE 1
    > REPLYTOQ Ack
    > ENCODING 546
    > CODEDCHARSETID 437
    > FORMAT MQHRF2
    >
    > MQRFH2
    > CODEDCHARSETID 437
    > NAMEVALUECCSID 437
    > NAMEVALUEDATA
    > STARTDATA
    >
    > RegSub
    > Vins/Francais/#
    > Test
    >

    > ENDDATA
    > TESTEND
    >
    > So, yes, an RFH2 is necessary because this is where the "meta language" is
    > found that instructs the Broker to register a subscription. In this case,
    > it's registering a subcription for all messages that are subsequently
    > published to the topic "Vins/Francais/*", and the queue named Test (at the
    > local queue manager as none is explicitly stated) is subscribed.
    > Incidentally, if you write your application to do the subscription using
    > JMS, then if you set the parameters correctly, JMS should take care of
    > setting up the RFH2 headers for you.
    >
    > This is all documented in theWMBv61 messagebroker_Publish_Subscribe.pdf
    > manual that you can download at
    > http://www-306.ibm.com/software/inte...roker/library/ (or
    > read it in the online manual delivered with the Broker Toolkit. Look in
    > the "Subscribing" section.
    >
    > Hope this helps more!
    > --
    > Carl
    >




+ Reply to Thread