Interoperation using the WebSphere MQ messaging provider
Through the WebSphere MQ messaging provider in WebSphere Application Server, Java Message Service (JMS) messaging applications can use the WebSphere MQ system as an external provider of JMS messaging resources.
WebSphere MQ is characterized as follows:
- Messaging is handled by a network of queue managers, each running in its own set of processes and having its own administration.
- Features such as shared queues (on WebSphere MQ for z/OS ) and WebSphere MQ clustering simplify administration and provide dynamic discovery.
- Many IBM and partner products support WebSphere MQ with (for example) monitoring and control, high availability and clustering.
- WebSphere MQ clients can run within WebSphere Application Server (JMS), or almost any other messaging environment by using a variety of APIs.
If the business uses WebSphere MQ, and to integrate WebSphere Application Server messaging applications into a predominantly WebSphere MQ network, the WebSphere MQ messaging provider is a logical choice. However, there can be benefits in using another provider. If we are not sure which provider combination is best suited to the requirements, see Choose messaging providers for a mixed environment.
The WebSphere MQ messaging provider supports JMS 1.1 domain-independent interfaces (sometimes referred to as "unified" or "common" interfaces). This enables applications to use the same interfaces for both point-to-point and publish/subscribe messaging, and also enables both point-to-point and publish/subscribe messaging within the same transaction. With JMS 1.1, this approach is considered good practice for new applications. The domain-specific interfaces are supported for backwards compatibility for applications developed to use domain-specific queue interfaces, as described in section 1.5 of the JMS 1.1 specification.
The WebSphere MQ messaging provider also supports the Java EE Connector Architecture (JCA) 1.5 activation specification mechanism for message-driven beans (MDBs) across all platforms supported by WebSphere Application Server.
We can use WebSphere Application Server to configure WebSphere MQ resources for applications (for example queue connection factories) and to manage messages and subscriptions associated with JMS destinations. You administer security through WebSphere MQ.
In a mixed-version WAS cell, we can administer WebSphere MQ resources on nodes of all versions. However, some properties are not available on all versions. In this situation, only the properties of that particular node are displayed in the console.
WAS v6.x contained a WebSphere MQ JMS client to facilitate interaction with WebSphere MQ. For WAS v7 and later this has been replaced with the WebSphere MQ resource adapter. The resource adapter is included with WebSphere Application Server and does not need to be installed separately. Service updates to the resource adapter are usually applied automatically through WebSphere Application Server fix packs. For more information about maintaining the resource adapter, see Maintain the WebSphere MQ resource adapter.
We can use the following four WebSphere MQ connection properties to configure the WebSphere MQ resource adapter used by the WebSphere MQ messaging provider. These properties affect the connection pool used by activation specifications:
- maxConnections
- connectionConcurrency (Setting this property only affects WebSphere Application Server 7 nodes. The property has no effect for WebSphere Application Server Version 8 or later nodes.)
- reconnectionRetryCount
- reconnectionRetryInterval
To connect to multi-instance WebSphere MQ queue managers, we can provide host and port information in the form of a connection name list, which a connection factory or activation specification uses to connect to a multi-instance queue manager.
WebSphere MQ queue or topic destination properties allow you to specify:
- Whether an application processes the RFH version 2 header of a WebSphere MQ message as part of the JMS message body.
- The format of the JMSReplyTo field.
- Whether an application can read or write the values of MQMD fields from JMS messages that have been sent or received using the WebSphere MQ messaging provider.
- Which message context options are specified when sending messages to a destination.
For more information about using WebSphere MQ with WebSphere Application Server, see the Product Connectivity Scenarios information center, which provides information that leads you through the key tasks required to connect WebSphere Application Server to WebSphere MQ in a variety of scenarios. Each scenario contains the instructions for implementing a solution in a business context, allowing you to learn as you go without needing to make use of other information resources.
Subtopics
- Network topologies: Interoperating using the WebSphere MQ messaging provider
There are several network topologies, clustered and not clustered, that allow WebSphere Application Server to interoperate with WebSphere MQ by using WebSphere MQ as an external JMS messaging provider. For providing high availability, some topologies are more suitable than others.
- WebSphere MQ messaging provider activation specifications
Activation specifications are used to configure inbound message delivery to message-driven beans (MDBs) running inside WebSphere Application Server. They supersede message listener ports, which are now a stabilized function.
- Enhanced features of the WebSphere MQ messaging provider
The WebSphere MQ messaging provider enables WebSphere Application Server applications and clients to connect to and use WebSphere MQ resources in a JMS-compliant manner. This provider includes the enhanced features described in this topic.
- Strict message ordering with the WebSphere MQ messaging provider and message-driven bean (MDB) applications
Message ordering is important to some asynchronous messaging applications; that is, it is important to process messages in the same order that the producer sends them. If this type of message ordering is important to the application, the design must take it into account.
- WebSphere MQ custom properties
WebSphere Application Server supports the use of custom properties to define WebSphere MQ properties. This is useful because it enables WebSphere Application Server to work with later versions of WebSphere MQ that might have properties that are not available in the WAS console.
- WebSphere MQ messages
A WebSphere MQ message usually contains a message descriptor, one or more message headers, and a message payload. WebSphere MQ provides programming interfaces that can help the applications to process WebSphere MQ messages.
Related concepts
Types of messaging providers
Related tasks
Maintain the WebSphere MQ resource adapter Manage messaging with the WebSphere MQ messaging provider Configure JMS resources for the WebSphere MQ messaging provider Configure the WebSphere MQ messaging provider with native libraries information Configure custom properties for WebSphere MQ messaging provider JMS resources
Related information:
Product Connectivity Scenarios information center
WebSphere MQ library