Set up a publish/subscribe broker

 

+

Search Tips   |   Advanced Search

 

We can use any of the following...

...as the publish/subscribe broker for WebSphere MQ JMS.

We can link to each of these brokers across a connection to base WebSphere MQ, or we can connect directly to...

...over TCP/IP. Each method requires some setup activities:

Linking across WebSphere MQ

  • Base WebSphere MQ

    First, create a broker publication queue, which is a WebSphere MQ queue on the broker queue manager. The broker publication queue is used to submit publications to the broker. We can choose your own name for this queue, but it must match the queue name in the TopicConnectionFactory’s BROKERPUBQ property. By default, a TopicConnectionFactory’s BROKERPUBQ property is set to the value...

    SYSTEM.BROKER.DEFAULT.STREAM

  • WebSphere MQ Integrator V2

    The next step is to set up a message flow within an execution group for the broker. The purpose of this message flow is to read messages from the broker publication queue. (If you want, we can set up multiple publication queues; each needs its own TopicConnectionFactory and message flow.)

    The basic message flow consists of an MQInput node (configured to read from the SYSTEM.BROKER.DEFAULT.STREAM queue) whose output is connected to the input of a Publication (or MQOutput) node.

    The message flow diagram therefore looks similar to the following...

    When this message flow is deployed and the broker is started, from the JMS application's perspective the WebSphere MQ Integrator V2 broker behaves like an WebSphere MQ Publish/Subscribe broker. The current subscription state can be viewed using the WebSphere MQ Integrator Control Center.

    No modifications are required to WebSphere MQ classes for Java Message Service.

    WebSphere MQ Publish/Subscribe and WebSphere MQ Integrator V2 brokers cannot coexist on the same queue manager.

Direct connection to WebSphere MQ Event Broker, V2.1 over TCP/IP

For this, set up a message flow within an execution group on WebSphere MQ Event Broker. This message flow is to read messages from the TCP/IP socket on which the broker is listening.

The basic message flow consists of a JMSIPOptimised flow set to listen on the port configured for direct connections. By default, this port is 1506.

WebSphere MQ Event Broker can be configured to listen for both direct connections across TCP/IP from WebSphere MQ JMS and connections made across TCP/IP through WebSphere MQ. In this case, the two listeners must be configured on different ports. The default port for a WebSphere MQ connection is 1414.

Direct connection to WebSphere Business Integration Event Broker, V5.0 or WebSphere Business Integration Message Broker, V5.0

To configure a WebSphere Business Integration Event Broker or WebSphere Business Integration Message Broker broker for a direct connection from WebSphere MQ JMS, create a message flow to read messages from the TCP/IP port on which the broker is listening and publish the messages. We can do this in either of the following ways:

  • We can create a message flow that contains a Real-timeOptimizedFlow message processing node.

  • We can create a message flow that contains a Real-timeInput message processing node and a Publication message processing node.

You must configure the Real-timeOptimizedFlow or Real-timeInput node to listen on the port used for direct connections. By default, the port number for direct connections is 1506.


uj34670_