Queue managers

The WebSphere MQ Everyplace queue manager allows WebSphere MQ Everyplace to support a variety of network configurations. It provides:

In WebSphere MQ Everyplace, you can only have one queue manager active on a single Java virtual machine (JVM), or in a single native application process at any one time. To have multiple queue managers on a machine, you require either multiple JVM or multiple native application processes.

Queue managers are identified by a globally unique name and an ASCII character string of unlimited length, excluding any of the following characters:
{ } [ ] # ( ) : ; , ' " =
This restriction is not enforced by WebSphere MQ Everyplace or WebSphere MQ, but duplicate queue manager names may cause messages to be delivered to the wrong queue manager. For interoperability, we recommend that you limit the maximum name length to 48 characters. The file system that you are using may also restrict the name length.

You can configure queue managers with or without local queueing. All queue managers support synchronous messaging operations. A queue manager with local queueing also supports asynchronous message delivery. Asynchronous message delivery and synchronous message delivery have very different characteristics and consequences:

Synchronous message delivery
With synchronous message delivery the application puts the message to WebSphere MQ Everyplace for delivery to the remote queue. WebSphere MQ Everyplace simultaneously contacts the target queue and delivers the message. After delivery, WebSphere MQ Everyplace returns immediately to the application. If the message cannot be delivered, the sending application receives immediate notification. WebSphere MQ Everyplace does not assume responsibility for message delivery in the synchronous case (non-assured message delivery).

Asynchronous message delivery
With asynchronous message delivery the application puts the message to WebSphere MQ Everyplace for delivery to a remote queue. WebSphere MQ Everyplace immediately returns to the application. If the message can be delivered immediately, or moved to a suitable staging post, then it is sent. If not, it is stored locally. Asynchronous delivery provides once, and once-only assured delivery, because the message has been passed to WebSphere MQ Everyplace and it has become responsible for delivery (assured message delivery).

Chapter 6, Message delivery, of the WebSphere MQ Everyplace Application Programming Guide provides detailed information on synchronous and asynchronous messaging.

Queue manager configuration

The queue manager runs in an environment established by WebSphere MQ Everyplace, before the queue manager is loaded. The queue manager stores its configuration information in its registry. The registry provides more information on this. The queues themselves (containing messages) are stored in queue stores.

You can configure the WebSphere MQ Everyplace environment using the API, utilities shipped with WebSphere MQ Everyplace, or management tools such as MQe_Explorer. These methods can capture the environment parameters in an initialization file, but this is optional. Chapter 5, Queue manager operations, of the WebSphere MQ Everyplace Application Programming Guide provides information on how to configure queue managers. The WebSphere MQ Everyplace Configuration Guide provides information on configuring queue managers using the MQe_Explorer tool.

You can configure a queue manager with WebSphere MQ bridge capabilities. This is called a gateway and, in Java, it exchanges messages with WebSphere MQ host and distributed products. The C codebase uses a device queue manager only. Chapter 7, Interoperability with other messaging systems of the WebSphere MQ Everyplace Application Programming Guide provides detailed information on how to configure the bridge.

Queue manager operations

Queue managers support messaging operations and manage queues. Applications access messages through the services of the queue manager using methods such as:

Get
This operation removes messages from a queue.

Put
This operation places messages on a queue.

Delete
By specifying the UID, you can delete messages from a queue without using the get operation.

Browse
You can browse queues for messages using a filter. Browsing retrieves all the messages that match the filter, but leaves them on the queue. WebSphere MQ Everyplace also supports Browsing under lock. This allows you to lock the matching messages.

Wait
In Java, applications can wait for a specified time for messages to arrive on a queue. This does not apply to the C codebase.

Listen
In Java, applications can listen for WebSphere MQ Everyplace message events, again with an optional filter. However, in order to do this, you must add a listener to the queue. Listeners are notified when messages arrive on a queue. This does not apply to the C codebase.

Many of these operations take a filter as one of their parameters. A filter matches an element for equality and any parts of the message can be used for selective retrieval. Most method calls also include an attribute to be used in the encoding or decoding of a message. Chapter 4, Messaging, of the WebSphere MQ Everyplace Application Programming Guide provides detailed information on messaging operations.



© IBM Corporation 2002. All Rights Reserved