Index Changes

Using the JMS Binding Component


Publishing and Subscribing to Multiple WebSphere Queues

WebSphere MQ allows you to specify publish and subscribe to multiple queues, which means that each subscriber retrieves all of its messages from a specific queue that is assigned to that subscriber. JMS creates a new dynamic queue for each subscriber, and each subscriber has exclusive use of the dynamic queue assigned to it.

When you use the multiple queue approach, you do not define an explicit queue name. Instead, you define a prefix name on which all dynamic queue names are based. The prefix name needs to end in an asterisk (*); for example, SYSTEM.JMS.D.PAYROLL.*. All dynamic queues that are associated with this subscription will have names that start with SYSTEM.JMS.D.PAYROLL.

For more detailed information about WebSphere queues and configuring multiple queues, see Subscriber Options.

There are two ways to define publishing and subscribing to multiple queues for the JMS BC:

  • Enter the destination name in the WSDL.
    The destination name provides only the prefix as described above, and does not include the full queue name. In this case, the JMSJCA parses the destination name to determine the actual destination name and properties. For example:
<operation name="JMSInOperation">
    <jms:operation destination="jmsjca://?name=Finance & brokerDurSubQueue=SYSTEM.JMS.D.PAYROLL.*" destinationType="Topic" ... subscriptionName="durSub-11">

This is how the same destination name would appear in the WSDL Properties panel.

  • Create an Admin Object Resource on the GlassFish Admin Console and use a JNDI lookup in the WSDL.
    To create the Admin Object Resource, do the following:
    1. Launch the GlassFish Admin Console and expand Resources > Connectors > Admin Object Resources.
    2. Create a new resource, and add a Name property using the same naming convention as above.
      The following figure illustrates an Admin Object Resource:

    3. Enter the JNDI lookup in the WSDL destination property, as shown below:
 <operation name="JMSInOperation">
    <jms:operation destination="lookup://jms/WMQTopic" destinationType="Topic"  
                   subscriptionName="durSub-11" ....>

After you configure the JMS BC to use multiple WebSphere queues, be sure to enable publish/subscribe on the WebSphere MQ broker. By default, it is not enabled in version 5.3 and 6.0.


JSPWiki v2.4.100
« Home Index Changes Prefs
This page (revision-11) was last changed on 21-Jul-09 11:33 AM, -0700 by sujit