+

Search Tips | Advanced Search

JMS destinations (queues and topics)

A JMS destination is an object (a JMS queue or a JMS topic) that represents the target of messages that the client produces and the source of messages that the client consumes. In point-to-point messaging, destinations represent queues; in publish/subscribe messaging, destinations represent topics.

The JMS client can use a single destination object to put messages on and to get messages from, or the JMS client can use separate destination objects. The same destination object can be used for both IBM MQ and Real-time messaging providers so, unlike with connection factories, we do not need to create separate destination objects for different messaging providers. Real-time transport is not available in IBM MQ Version 8.0. If we are using IBM MQ Version 8.0 we can define Real-time transport, but it fails when an attempt is made to create a connection.

In the figure, the destination called Destination 1 is stored in the Destinations folder of the initial context called File System Initial Context.

When creating a destination object, we must specify whether the destination is a JMS queue (in the point-to-point messaging domain) or a JMS topic (in the publish/subscribe messaging domain); we cannot change the domain after the destination has been created. We must also configure the destination with the name of the queue or topic that the destination represents. An advantage of using JMS is that we can change the name of the queue or topic that the JMS client uses by changing the value of a property in the destination definition and we do not update the JMS client itself.

For more information, see Use IBM MQ classes for JMS and Publish/subscribe messaging.

Parent topic: Create and configure JMS administered objects


Related concepts

Last updated: 2020-10-04