Using WMQ with WAS and Liberty
- There are three main options for connecting WAS applications to a WMQ messaging backbone: 1) using WMQ as the JMS provider, 2) using the service integration bus (SIBus) to connect to WMQ, or 3) using SIBus for intra-WAS messaging and WMQ for inter-system messaging.
- The WMQ JMS resource adapter provides a standardized way for WAS applications to connect to WMQ and supports both bindings mode and client mode configurations. It handles reconnection and supports multi-instance queue managers for high availability.
- SIBus can also be used to connect to WMQ either asynchronously by routing messages through SIBus,
2. 1
IBM® WebSphere® Application Server
Enterprise standard Java™ Application Server
Highly scalable: single server up to massive network deployment
Web gui and command line interface (wsadmin)
3. 2
Liberty
Using WebSphere MQ with WebSphere Application Server and the Liberty Profile
Lightweight, Developer focussed
Eclipse based: server.xml and WAS Developer Tools
wasdev.net
Bundled in WebSphere Application Server version 8.5.5
4. WAS’ messaging in a slide
• WebSphere Application Server (WAS) is a JEE application server, JEE includes
support for asynchronous messaging using JMS (Java Message Service)
• Allows Java application interactions to be loosely coupled
• Temporal and transactional decoupling of applications
• A standardised programming interface
• Implemented by a JMS provider
• JMS applications can be coded to be ignorant of the underlying JMS provider
– Provider specific configuration, such as how to connect to a messaging provider, is contained
within JMS resources held in JNDI, defined at application deployment time
• JMS is not a transport protocol
– No standardised ability to couple different JMS providers
• JMS Supports two messaging models
• Point-to-point – using queues
• Publish/subscribe – using topics
• WebSphere Application Server provides first class support for two JMS messaging
providers
• An embedded messaging provider, the Default Messaging provider (or Service
Integration Bus)
• WebSphere MQ as an external messaging provider
5. IBM MQ in a slide
• IBM MQ (WMQ)
• WMQ is IBM’s flagship asynchronous messaging product
• Queues are managed by queue managers
• Queue Managers can be connected together to form a network, or cluster
• Messaging applications connect to queue managers to access queues
– Applications can send messages to any queue in the network from their queue
manager
– Applications can receive messages from queues on their queue manager
• WMQ supports the point-to-point and publish/subscribe messaging models
• WMQ as the JMS provider in WAS
• WMQ supports the JMS programming interface for Java applications.
• Applications in WAS can use JMS to interact with WMQ queues (and topics)
– WAS V6 and V6.1 contains a WMQ JMS client to enable this
– WAS V7 contains the WMQ V7 JCA resource adaptor
• WAS applications connect to a queue manager using:
– Bindings – when application and queue manager are on the same server
– Client – when application server and queue manager are on separate, networked,
servers - using a TCP/IP socket
6. Service integration bus in a slide
• Service Integration Bus (SIBus)
• SIBus is a native component of WAS, forming the asynchronous messaging
platform for application server based products
• Logically:
– A bus is a logical entity that contains destinations (e.g. queues/topic spaces)
– Messaging applications connect to the bus to access the destinations
– A bus is location transparent, all destinations and their messages are available from
anywhere in the bus
• Physically:
– A WAS cell contains application servers, or clusters of application servers
– These can optionally be made a member of a bus
– Destinations are assigned to bus members
– Bus members run messaging engines within the application server JVMs
– Messaging engines manage the runtime and persistent state of messages in the bus
– Messaging applications form a connection to a messaging engine
– Messages are routed from any messaging engine in the bus to the application
• SIBus as the JMS provider in WAS
• SIBus supports the JMS programming interface for Java applications.
– Natively supporting both point-to-point and publish/subscribe messaging models
• SIBus is the default JMS provider in WAS – hence the “Default messaging
provider”
7. Options for accessing your WMQ backbone
• Three key options
1. Use WMQ as the JMS provider in WAS
2. Use the service integration bus in WAS and connect that
messaging system with your WMQ backbone
3. Use SIBus for intra-WAS messaging, use WMQ for inter-system
messaging
9. 8
Version 6 Messaging Architecture
Using WebSphere MQ with WebSphere Application Server and the Liberty Profile
10. 9
The solution now
Picture courtesy: public domain
Source: http://www.livescience.com/20404-gallery-sun-gods-goddesses.html
Using WebSphere MQ with WebSphere Application Server and the Liberty Profile
RA
11. 10
Introducing the IBM® WebSphere® MQ JMS Resource
Adapter
Using WebSphere MQ with WebSphere Application Server and the Liberty Profile
wmq.jmsra.rar
12. 11
Why have a Resource Adapter?
Java Enterprise Edition
(Java EE)
Java Connector Architecture
(JCA)
Using WebSphere MQ with WebSphere Application Server and the Liberty Profile
13. 12
Harnessing the Resource Adapter: WAS
Using WebSphere MQ with WebSphere Application Server and the Liberty Profile
Deployed inside WebSphere Application Server
WAS is shipped with a validated RA
RA can be a different version to the Queue Manager
14. 13
Harnessing the Resource Adapter: Liberty
Supported from Liberty version 8.5.5
Download from IBM Fix Central – search 'Resource Adapter'
Using WebSphere MQ with WebSphere Application Server and the Liberty Profile
<server description="new server">
<!-- Enable features -->
<featureManager>
<feature>jsp-2.2</feature>
<feature>localConnector-1.0</feature>
<feature>ejbLite-3.1</feature>
<feature>jmsMdb-3.1</feature>
<feature>jndi-1.0</feature>
<feature>wmqJmsClient-1.1</feature>
</featureManager>
<variable name="wmqJmsClient.rar.location"
value="C:MY_RA_FOLDERwmq.jmsra.rar"/>
</server>
15. 14
Managing the Resource Adapter
Using WebSphere MQ with WebSphere Application Server and the Liberty Profile
Client mode – no configuration necessary
Bindings mode:
WAS: set 'native library path' on Resource Adapter
Liberty: <wmqJmsClient nativeLibraryPath="/opt/mqm/java/lib64"/>
Updates to RA:
WAS: WAS Fix Packs and iFixes
Liberty: updated download from Fix Central
16. 15
Version 7 onwards Messaging Architecture
Using WebSphere MQ with WebSphere Application Server and the Liberty Profile
17. 16
Practical benefits: standardised, well-versioned
connections
Photo courtesy: public domain
Source: http://pixabay.com/en/industrial-mess-electric-power-69750/
Using WebSphere MQ with WebSphere Application Server and the Liberty Profile
Photo courtesy: public domain
Source: http://pixabay.com/en/communication-connection-113613/
19. 18
Practical benefits
Using WebSphere MQ with WebSphere Application Server and the Liberty Profile
Simplified maintenance
Ease of migration
Easier consumption of Multi-Version WMQ
23. 22
High availability with Multi-Instance Queue Managers
Using WebSphere MQ with WebSphere Application Server and the Liberty Profile
WebSphere MQ Automatic Client Reconnect is NOT supported with
Java EE Application Servers
Configure WAS to automatically reconnect instead
24. 23
High availability with Multi-Instance Queue Managers
with Activation Specifications
Using WebSphere MQ with WebSphere Application Server and the Liberty Profile
Connection Factory
Connection Name List – host(port) for Active instance, host(port) for standby instance
CCDT (Client Channel Definition Table)
Resource Adapter
Reconnection Retry Count – default is 5
Reconnection Retry Interval – default is 5 minutes
Activation Specification
Connection Name List – host(port) for Active instance, host(port) for standby instance
Stop endpoint if message delivery fails
Number of sequential delivery failures before suspending endpoint
25. 24
High availability with Multi-Instance Queue Managers
with Listener Ports
Using WebSphere MQ with WebSphere Application Server and the Liberty Profile
Connection Factory
Connection Name List – host(port) for Active instance, host(port) for standby instance
CCDT (Client Channel Definition Table)
Message Listener Service
Maximum Retries (on listener port) – default is 0
Custom property: MAX.RECOVERY.RETRIES – default is 5
Custom property: RECOVERY.RETRY.INTERVAL – default is 60 seconds
29. Asynchronous connectivity to WMQ
WMQ-to-WMQ
• WMQ queue managers can be networked together, allowing messages
to be asynchronously sent from applications connected to one queue
manager to queues located on other queue managers
• Store and forward of routed messages
• Network connections using channels
• Message routing using remote queue managers and remote queues
Queue
Manager
app
app
WMQ network
Queue
Manager
30. Asynchronous connectivity to WMQ
SIBus-to-WMQ
• So, it’s just a matter of joining the two together…
• The WMQ queue manager sees the connected SIBus as another remote
queue manager, connected via a sender and receiver channel, allowing
messages to be routed through to the SIBus as for any other connected queue
manager.
• The SIBus sees the connected queue manager as another bus, connected via
a foreign bus connection, allowing messages to be routed through to the queue
manager as for any other connected bus.
• Messaging applications on either side are not aware of the transition.
AppServer AppServer
ME
app
Bus
SIBus network
app
WMQ network
Queue
Manager
Queue
Manager
31. Asynchronous connectivity with WMQ
• What does this add?
• Ability to asynchronously queue messages in the WAS system
while connectivity with the WMQ backbone is unavailable
• All JMS resources defined are SIBus resources, referring to
SIBus objects.
– Fine grain authorisation access to those resources can be managed
using SIBus authorisation, within the WAS configuration domain.
– WMQ configuration is restricted to the SIBus configuration domain.
– WMQ topology is hidden from JMS resource configuration
• What does it cost?
• Extra latency
• Only able to send messages to WMQ queues,
unable to receive from WMQ queues
– WMQ applications must send to queues located
in the SIBus (using remote WMQ queues)
• Additional configuration
• Additional runtime management
SIBus network
WMQ network
33. Synchronous connectivity with WMQ
• When WMQ is the JMS provider in WAS, a JMS application will connect
directly to a queue manager
• This requires a WMQ JMS ConnectionFactory, defining where the queue
manager is and how to connect to it.
• The embedded WMQ JMS client in WAS is then used to synchronously
connect to the queue manager.
• The application will also require a WMQ JMS Queue which defines the
actual queue located on that queue manager.
• This allows synchronous style messaging with WMQ
WMQ JMS client
AppServer
app
WMQ network
Queue
Manager
WAS config
JNDI
ConnectionFactory
<QMgr location>
JMS Queue
<WMQ queue name>
WMQ JMS
34. SIBus synchronous connectivity with WMQ
• It is possible to insert the SIBus runtime between the application and the queue manager,
such that the JMS application actually connects to the SIBus runtime and the bus manages
the synchronous connection to a queue manager when required.
• This requires an SIBus JMS ConnectionFactory, defining which bus to connect to, and an
SIBus JMS Queue, defining which SIBus queue to send or receive messages from.
• The configuration detailing which queues are available on which queue managers, and how to
connect to those queue managers is contained in the SIBus configuration.
• A connection will then be made to a messaging engine in the bus, which will then make a
synchronous connection to the correct queue manager.
• This allows synchronous style messaging with WMQ
AppServer
WMQ network
Queue
Manager
WAS config
SIBus config
WMQ bus member
<QMgr location>
JNDI
SIBus queue
<WMQ queue>
app
ME
ConnectionFactory
<SIBus name>
JMS Queue
<SIBus queue name>
SIBus JMS
WMQ
35. SIBus synchronous connectivity with WMQ
• What does this add?
• All JMS resources defined are SIBus resources, referring to SIBus
objects within the WAS configuration domain.
– WMQ configuration is restricted to the SIBus configuration domain.
• WMQ shared queue on z/OS can be fully utilised from WAS
– Supports transaction recovery across multiple members of the queue
sharing group, enabling full shared queue workload balancing and high
availability.
• What does it cost?
• Extra code path, slower performance
• Additional overall configuration complexity
• Additional runtime management
WMQ network
WAS config
SIBus config
JNDI
37. 37
Product Connectivity Scenarios Information Centre
Hands on, scenario based education for MQ:WAS and MQ:Liberty
inter-operation
Using WebSphere MQ with WebSphere Application Server and the Liberty Profile
38. 38
IBM Product Information
Using WebSphere MQ with WebSphere Application Server and the Liberty Profile
See the new IBM Knowledge Center – No more infocenters from 2014!
39. 39
Summary
Different options to connect to WMQ from WAS
WebSphere MQ JMS RA provides MQ messaging to WAS
Easier maintenance and upgrading
MuIti Instance Queue Managers – configure your Application
Server
Using WebSphere MQ with WebSphere Application Server and the Liberty Profile
42. Notices and Disclaimers (con’t)
Information concerning non-IBM products was obtained from the suppliers of those products, their published
announcements or other publicly available sources. IBM has not tested those products in connection with this
publication and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM
products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products.
IBM does not warrant the quality of any third-party products, or the ability of any such third-party products to
interoperate with IBM’s products. IBM EXPRESSLY DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED,
INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE.
The provision of the information contained herein is not intended to, and does not, grant any right or license under any
IBM patents, copyrights, trademarks or other intellectual property right.
• IBM, the IBM logo, ibm.com, Bluemix, Blueworks Live, CICS, Clearcase, DOORS®, Enterprise Document
Management System™, Global Business Services ®, Global Technology Services ®, Information on Demand,
ILOG, Maximo®, MQIntegrator®, MQSeries®, Netcool®, OMEGAMON, OpenPower, PureAnalytics™,
PureApplication®, pureCluster™, PureCoverage®, PureData®, PureExperience®, PureFlex®, pureQuery®,
pureScale®, PureSystems®, QRadar®, Rational®, Rhapsody®, SoDA, SPSS, StoredIQ, Tivoli®, Trusteer®,
urban{code}®, Watson, WebSphere®, Worklight®, X-Force® and System z® Z/OS, are trademarks of
International Business Machines Corporation, registered in many jurisdictions worldwide. Other product and
service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on
the Web at "Copyright and trademark information" at: www.ibm.com/legal/copytrade.shtml.
43. Thank You
Your Feedback is
Important!
Access the InterConnect 2015
Conference CONNECT Attendee
Portal to complete your session
surveys from your smartphone,
laptop or conference kiosk.