An MQ bridge queue is a remote queue definition that refers to a queue residing on an MQ queue manager. The queue holding the messages resides on the MQ queue manager, not on the local queue manager.
The definition of the bridge queue requires that bridge, MQ queue manager proxy, and client connection names are specified to uniquely identify a client connection object in the bridge object hierarchy. Refer to Figure 2 for more information. This information identifies how the MQ bridge accesses the MQ queue manager, to manipulate an MQ queue.
The MQ bridge queue provides the facility to put to a queue on a queue manager that is not directly connected to the MQ bridge. This allows a message to be sent to an MQ queue manager (the target) routed through another MQ queue manager. The MQ bridge queue takes the name of the target queue manager and the intermediate queue manager is named by the MQ queue manager proxy.
For a complete list of the characteristics used by the MQ bridge queue, refer to MQeMQBridgeQueueAdminMsg in the com.ibm.mqe.bridge section of Java Programming Reference.
Type of operation | Supported by MQ bridge queue |
---|---|
getMessage() | yes* |
putMessage() | yes |
browseMessage() | Yes* |
browseAndLockMessage | no |
Note: * These functions have restrictions on their use. Refer to Messaging for more information. |
If an application attempts to use one of the unsupported operations, an MQeException of Except_NotSupported is returned.
When an application puts a message to the bridge queue, the bridge queue takes a logical connection to the MQ queue manager from the pool of connections maintained by the bridge's client connection object. The logical connection to MQ is supplied by either the MQ Java™ Bindings classes, or the MQ Classes for Java. The choice of classes depends on the value of the hostname field in the MQ queue manager proxy settings. Once the MQ bridge queue has a connection to the MQ queue manager, it attempts to put the message to the MQ queue.
An MQ bridge queue must always have an access mode of synchronous and cannot be configured as an asynchronous queue. This means that, if your put operation is directly manipulating an MQ bridge queue and returns success, your message has passed to the MQ system while your process was waiting for the put operation to complete.
If you do not want to use synchronous operations against the MQ bridge queue, you can set up an asynchronous remote queue definition that refers to the MQ bridge queue. See Message delivery for information on asynchronous message delivery. Alternatively, you can set up a store-and-forward queue, and home-server queue. These two alternative configurations provide the application with an asynchronous queue to which it can put messages. With these configurations, when your putMessage() method returns, the message may not necessarily have passed to the MQ queue manager.
An example of MQ bridge queue usage is described in Bridge configuration example.