SlideShare une entreprise Scribd logo
1  sur  231
© 2013 IBM Corporation
WebSphere
WebSphere MQ v7.5
Enablement Training
© 2010 IBM Corporation
WebSphere MQ in a nutshell
© 2010 IBM Corporation
What is Websphere MQ
 Software that enables programs to communicate across a network using a simple and
consistent application programming interface.
 A messaging and queuing middleware, with publish/subscribe
Messaging: programs communicate by sending each other data in messages rather
than by calling each other directly.
Queuing: the messages are placed on queues in storage, so that programs can run
independently of each other, at different speeds and times, in different locations, and
without having a logical connection between them.
Publish/subscribe: a program can send (publish) data to a single destination, and let
WebSphere MQ deal with the distribution of that data to other programs (subscribers).
The publisher defines a topic for the information, and the subscriber specifies what
topics it wants to receive.
© 2010 IBM Corporation
What it can do for me?
 Sends and receives data between your applications, and over networks.
 Message delivery is assured and decoupled from the application.
 Your application programmers do not need to have communications programming
knowledge.
© 2010 IBM Corporation
How do I use it
 Use its associated tools to create your initial configuration.
– WebSphere MQ Explorer workbench
– WebSphere MQ Script commands (MQSC)
– Programmable Command Format (PCF)
 Use the MQ API (MQI) in your application to connect to a queue manager, open queues
and topics, and put and get messages.
© 2010 IBM Corporation
6
MQ Client MQ Server
How does WebSphere MQ work?
 Messaging services are based on Queues
that store and forward data based on simple
programming commands
 Uses the proven database technique of two-
phase commit transactions to ensure
messages are not lost or duplicated
 Uses publish/subscribe to route messages
dynamically based on keywords or “topics”
 Uses multi-processor threading and
clustering to accelerate throughput of
messages
Message
Queue
Application ZApplication A
© 2010 IBM Corporation
INSTALLING WebSphere MQ
© 2010 IBM Corporation
Installation
 Read the documentation/manual
– Main resource: IBM WMQ Infocenter
– Take a look at the specific target platform chapter
 Know what you are going to install (server or client?)
 Find out the system requirement
 Prepare your installation
– Write your non-functional requirement
– Design and draw the topology (architecture)
– Design and document the configuration
 Verify the installation
– Test
© 2010 IBM Corporation
Preparation of WMQ Server Installation
 Separate the volume for product code & working data or even more
– Product code: /opt/mqm or C:Program FilesIBMWebSphere MQ
– Working data: /var/mqm or anywhere
– Recovery log data: /var/mqm/log
– Error files: error files (/var/mqm/errors)
 Prepare/check the disk space for product code & working data
– Product data min ~350MB (Linux/Unix)
– Working data disk size consideration:
• The maximum number of messages in the system at one time
• Contingency for message buildups, if there is a system problem
• The average size of the message data, plus 500 bytes for the message header
• The number of queues
• The size of log files and error messages
– Log data disk size calculation
© 2010 IBM Corporation
Software components (Linux)
Linux/Windows only
© 2010 IBM Corporation
WebSphere MQ Server Installation
 Linux
– ./mqlicense.sh –accept
– rpm -ivh MQSeriesRuntime-7.0.1-0.i386.rpm MQSeriesServer-7.0.1-0.i386.rpm
 AIX
– installp -axgXYd. All
 Solaris
– ./mqlicense.sh -text-only
– pkgadd -d.
 HP-UX
– ./mqlicense.sh –accept
– swinstall -s $PWD/hp-Uxxxxx.v11 MQSERIES
 Windows
– Run Setup.exe
© 2010 IBM Corporation
IBM GSKit
 IBM WebSphere Eclipse Platform
 IBM Global Security Kit (GSKit)
 Subcomponent that provides support for SSL and TLS for Windows, Linux/Unix
© 2010 IBM Corporation
User ID
WebSphere MQ utilize user authentication of the system operation.
Prerequisite for installation (Linux/Unix):
user ID: mqm, with a primary group of mqm
To configure multi-instance queue managers, use the same UID & GID
To run administration commands e.g. crtmqm, you need to be a member of mqm group
© 2010 IBM Corporation
LAB 1: Install WebSphere MQ
 In the First Lab you will:
– Find WebSphere MQ system requirements information
– Find WebSphere MQ documentation (Information center)
– Read installation requirements
– Download & Install offline WMQ infocenter
– Download WMQ Trial
– Install WMQ in Windows
– Loking around at WebSphere MQ installation directory
– View mqs.ini file
© 2010 IBM Corporation
MQ Installation Directory
 Sample mqs.ini file
© 2010 IBM Corporation
WebSphere MQ
© 2010 IBM Corporation
Message
 A collection of data sent by one program and intended for another program
 A message is built by an application
 A message is consumed by a different application
 Message can contain any kind of data
 Type of message:
 Type of message is identified by an MQMT_* value
 We can also define our own types of message
• Datagram A simple message for which no reply is expected
• Request A message for which a reply is expected
• Reply A reply to a request message
• Report A message that describes an event such as the occurrence of an error
© 2010 IBM Corporation
Message Composition
 WMQ message are made up of two parts:
 Both are supplied by the sending application
 Some fields in the message descriptor are set by the queue manager on behalf of the
application
Message properties Application data
© 2010 IBM Corporation
The structure of an MQ Message
Message Headers
 A Set of Message Attributes
understood and augmented
by the Queue Manager
–Unique Message Id
–Correlation Id
–Routing Information
–Reply Routing
Information
–Message Priority
–Message Persistence
•Persistent
•Non-persistent
–Message Codepage
–Message Format
–Etc…
Message Data
 Any sequence of bytes
–Defined by the sending program
–Understood by the receiving program
–NOT meaningful to the Queue Manager
 Can contain any data
–Structured
• XML, Tagged, Tagged Delimited, C
or Cobol defined, etc.
–Unstructured
• Binary
A video, a picture, etc.
• Any content
Message Headers Message DataMessage Properties
Message Properties
• Arbitrary values
associated with the
message but not part of
the body
• Properties can be integers,
strings, boolean, etc.
• Receiving apps do not see
them unless they want
• Permits explicit statement
of relationships between
messages
• e.g. Message X is a
REPLY to Message Y
© 2010 IBM Corporation
Some fields in the message descriptor
Message descriptor fields Publication/subscription message descriptor fields
• SubName
• SubUserData
• SubCorrelId
• PubPriority
• PubAccountingToken
• PubAppIdentityData
SubLevel
• ResObjString
© 2010 IBM Corporation
Message Properties
 Can be used to include business data or state information without having to store it in the
application data
 Used by message selectors
– to filter publications to topics
– to selectively get messages from queues
 Queue manager has MaxPropertiesLength to control the size of the properties
 Property name is a case-sensitive character string, limited to +4095 characters
 Property data type:
– boolean
– byte string
– character string
– floating-point
– integer number
 Accessible by JMS as JMS message properties if prefixed by “usr.”
– message.getStringProperty('myproperty')
© 2010 IBM Corporation
Message Length & Segmentation
 The length of data ≤ MaxMsgLength attribute of both the queue and queue manager
 The default maximum message length is 4 MB but can be changed up to max 100 MB
 Message segmentation
– message is too large to be handled by queue or queue manager
© 2010 IBM Corporation
23
Message persistence
Queue
Manager
Queue
CC/R
C
Queue
Application
Program
MQPU
T
MQPU
T
Queue
Files
Non-
Persistent
message
Persistent
message
 The persistence of a message is determined
by the value of the Persistence field in its
message descriptor.
 Both persistent and non-persistent messages
can be stored on the same queue.
 Persistence is accomplished via message
logging
 Persistent Messages are always recoverable
 Non-persistent Messages have 2 classes of
service:
Messages are retained for the life of the Queue
Manager
Messages can survive a normal shutdown and
restart of the Queue Manager
 Logging has implication on performanceLogs
CC/R
C
© 2010 IBM Corporation
Message Priority
 Priority field of the MQMD structure can be set
 MsgDeliverySequence attribute of the queue determines whether
– stored in FIFO (first in, first out) sequence
– in FIFO within priority sequence
 DefPriority attribute of a queue sets the default priority value
 MaxPriority attribute of the queue manager is the maximum priority we can assign
© 2010 IBM Corporation
Application Data Conversion
 Application data of a message can be converted at the sending queue manager, or at the
receiving queue manager
 Messages with MQFMT_NONE specified are not converted
© 2010 IBM Corporation
MESSAGE QUEUING
© 2010 IBM Corporation
27
What is a Queue ?
 Messages are delivered asynchronously to a Queue
 A Place to hold messages
 Queue creation
– Pre-defined
– Dynamic definition
 Message Access
– FIFO (first in first out)
– Priority (FIFO within Priority)
– Direct
– Destructive & non-destructive access
 Parallel access by applications
– Managed by the queue manager
© 2010 IBM Corporation
Message Queuing – Main Features
 There are no direct connections between programs (decoupled)
 Communication between programs can be time-independent.
 Work can be carried out by small, self-contained programs.
 Communication can be driven by events.
 Applications can assign a priority to a message.
 Security.
 Data integrity.
 Recovery support.
© 2010 IBM Corporation
Queues can be Local or Remote
MQ
I
System 1 System
2
Messagin
g
and
Queuing
Messagin
g
and
Queuing
TCP/IP is primary protocol
Q1
Q2
Put Q2 Put Q1 Get Q1 Get Q2
XmitQ
MQ
I
Get Q2
Program
A
Program
B
Program
C
Sender
Channel
Receiver
Channel
© 2010 IBM Corporation30
Queue
The types of queue that WebSphere MQ supports for applications to use are
© 2010 IBM Corporation
Queue definition and independence
© 2010 IBM Corporation32
WebSphere MQ – Queue
 Alias Queue
– Is not real queues but definitions.
– Used to assign different names to the same physical queue.
– The other queue can be:
• A local queue
• A local definition of a remote queue
• A topic.
 Cluster Queue
– A local queue that is known throughout a cluster of queue managers, that is, any
queue manager that belongs to the cluster can send messages to it without the
need of a remote definition or defining channels to the queue manager that owns
it.
 Remote Queue
– is a definition (not a real queue), owned by a different queue manager.
– A remote queue definition is the local definition of a remote queue.
– Application can access a remote queue just as use the name of a local queue.
– A program cannot read messages from a remote queue.
© 2010 IBM Corporation33
WebSphere MQ – Queue
 Model/Dynamic Queue
– Such a queue is defined "on the fly" when the application needs it.
– Retained by the queue manager or automatically deleted when the application program
ends.
– Dynamic queues are local queues.
– They are often used in conversational applications, to store intermediate results.
– Dynamic queues can be:
Temporary queues that do not survive when queue manager restarts
Permanent queues that do survive when queue manager restarts
 Local Queue
– A queue is local if it is owned by the queue manager to which the application program is
connected.
– For example, program A and program B each has a queue for incoming messages and
another queue for outgoing messages. Since the queue manager serves both programs,
all four queues are local.
© 2010 IBM Corporation34
WebSphere MQ – Queue
 Transmission Queue
– A remote queue is associated with a transmission queue.
– Transmission queues are used as an intermediate step when sending messages to
queues that are owned by a different queue manager.
– Typically, there is only one transmission queue for each remote queue manager (or
machine).
– Transmission queues are transparent to the application. They are used internally by
the queue manager
– All messages written to queues owned by a remote queue manager are actually written
to the transmission queue for this remote queue manager.
– The messages will then be read from the transmission queue and sent to the remote
queue manager using MQ Series clusters
– There is only one transmission queue for all messages sent to all other queue managers
in the cluster.
© 2010 IBM Corporation35
WebSphere MQ – Queue
 Initiation Queue
– A local queue to which the queue manager writes a trigger message when certain
conditions are met on another local queue
– Example:
• when a message is put into an empty message queue or in a transmission queue, a
trigger message is written to the corresponding initiation Queue. Such a trigger
message is transparent to the programmer.
– Two of MQ applications monitor initiation queues and read trigger messages
• The trigger monitor which starts applications
• The channel initiator which starts the transmission between queue managers.
– Applications do not need to be aware of initiation queues.
See Triggering topic
© 2010 IBM Corporation36
WebSphere MQ – Queue
 Dead-letter Queue
– A queue manager must be able to handle situations when it cannot deliver a message.
Examples:
• The destination queue is full.
• The destination queue does not exist.
• Message puts have been inhibited on the destination queue.
• The sender is not authorized to use the destination queue.
• The message is too large.
– Used as a repository for all messages that cannot be delivered.
– Defined when the queue manager is created.
– Messages can be put on the DLQ by
• queue managers
• message channel agents (MCAs)
• Applications
• All messages must be prefixed with a dead-letter header structure, MQDLH
• The Reason field of the MQDLH structure contains a reason code that identifies why
the message is on the DLQ
© 2010 IBM Corporation
LOG
PUT GET
Messaging
& Queuing
Operating
System
& Storage
Communications
Utilities
Listener
Command Server
Trigger monitor
Channel Initiator
Windows Explorer
Applications
Operating System
• Timers
• Semaphores
• ECBs
• Memory
• …
What is a Queue Manager?
© 2010 IBM Corporation
38
Elements of Messaging and Queuing
 Programs communicate by putting messages in message queues
“A building block for
distributed processing”
© 2010 IBM Corporation
39
Elements of Messaging and Queuing
Communication can be one way or two way
© 2010 IBM Corporation
40
Elements of Messaging and Queuing
Either program can be busy or unavailable
© 2010 IBM Corporation
41
Elements of Messaging and Queuing
One to many . . .
© 2010 IBM Corporation
42
Elements of Messaging and Queuing
Or many to one . . .
© 2010 IBM Corporation
Triggering
 Triggering start when the right conditions are detected by the queue manager
 A trigger message send to a queue called an initiation queue
© 2010 IBM Corporation
Trigger
 Tigger is internally used for starting the channel to transfer the message
© 2010 IBM Corporation
LAB 2A: Verifying Installation
 In this Lab you will verifying the MQ Server installation by
– Using command line to check installed WebSphere MQ version
– Using command line to create a Queue Manager and starting it
– Using MQSC to create a queue
– Using sample program to put text message into the queue (amqsput)
– Using sample program to get text message from the queue (amqsget)
MQ_INSTALLATION_PATHbinsetmqenv –s
dspmqver
crtmqm QMA
strmqm QMA
runmqsc QMA
DEFINE QLOCAL (QUEUE1)
end
amqsput QUEUE1
amqsget QUEUE1
© 2010 IBM Corporation
LAB 2B: Verifying Server-to-Server Installation
 In this Lab you will verifying the MQ Server to MQ Server installation & communication by
– Using command line to create a Queue Manager and starting it
– Using MQSC to create local queue, remote queue, create & start listener, create channel
– Using sample program to put text message into the queue (amqsput)
– Using sample program to get text message from the queue (amqsget)
© 2010 IBM Corporation
LAB 3: Exploring WMQ Explorer
Administration Using the WebSphere MQ Explorer
 In this Lab you will:
– Create a Queue Manager
– Work with Queues (create,
test, browse, delete)
– Create a Queue Manager
Group (or Set)
– Administer a Group of
Queue Managers
Collectively
– Use Filters
MQ Explorer is included with an MQ server installation and is also available for download as
SupportPac MS0T.
Since MQ Explorer V7.1 it can be installed as an Eclipse Plug-in via Eclipse Marketplace
© 2010 IBM Corporation
INTERCOMMUNICATION
© 2010 IBM Corporation
Intercommunication
• Sending messages from one queue manager to another
• Could be on the same machine or another
• Could be running on the same platform at local or different platform
(distributed environment)
• Systems Network Architecture Advanced Program-to
Program Communication (SNA APPC)
• TCP/IP
• Network Basic Input/Output System (NetBIOS)
• Sequenced Packet Exchange (SPX)
© 2010 IBM Corporation
Components handles intercommunication
 Queue Manager has a definition of
• Its queue
• Remote queue definitions
 Transmission queue
– a special type of local queue on which messages are stored until they can be
successfully transmitted and stored at the remote queue manager
– the messages are destined for a remote queue manager is stored in here first
– one transmission queue need to be defined for each sending MCA unless we use cluster
 Message Channel Agent (MCA)
– handles the sending and receiving of messages
– takes messages from the transmission queue and puts them on the communication link
– receives messages and delivers them onto a queue
 Channel
– a one-way communication link between two queue managers
– carry messages destined for any number of queues at the remote queue manager
 Listener
– processes that accept network requests
© 2010 IBM Corporation
What is Channel?
 Queue Manager to Queue Manager
(Message channel)
– Uni-directional
– Usually defined in pairs for example:
• One Sender
• One Receiver
– Asynchronous
 Client to Queue Manager (MQI channel)
– Bi-directional
– Defined as a single channel
– Synchronous
 A building block for a reliable Enterprise Service Bus (ESB)
* Note: Client to Client communication must go via a Queue Manager
© 2010 IBM Corporation
Components needed to send a message
 A simple channel consist of
– a sender channel definition at the local queue manager
– a receiver channel definition at the remote queue manager
 These two definitions must have the same name
 Dead-letter queue (undelivered message queue)
– if messages cannot be delivered to their destination, they are put on this queue
– Each queue manager should have this queue
© 2010 IBM Corporation
Components needed to return a message
 To run in the opposite direction between the queue managers, you need to define another
channel
© 2010 IBM Corporation
Message Channels
 Uni-directional QM to QM
 Types of end point of a message channel
1. Sender
2. Receiver
3. Server
4. Requester
5. Cluster sender
6. Cluster receiver
 Combination of connecting two end points
of message channels
1. Sender-receiver
2. Requester-server
3. Requester-sender (callback)
4. Server-receiver
5. Cluster sender-cluster receiver
1 & 4
2
3
5
© 2010 IBM Corporation
Channel Initiator & Listener
 A channel initiator acts as a trigger monitor for sender channels.
 Implementation channel initiators & listeners is platform specific (read the doc).
 The default behavior is to start a channel initiator when a queue manager is automatically
started. This can be changed by setting SCHINIT attribute of the queue manager to
MANUAL
© 2010 IBM Corporation
Cluster
An alternative to the traditional WebSphere MQ network
 A network of queue managers that are logically associated in some way
 Queues in a queue manager is available to every other queue manager in the cluster
 Any queue manager can send a message to any other queue manager in the same cluster
without the need for explicit channel definitions, remote-queue definitions, or
transmission queues for each destination
Every queue manager in a cluster:
 has a single transmission queue
 needs to define only one cluster-receiver
channel and one cluster-sender channel
© 2010 IBM Corporation
Channel-exit programs
 To do some additional processing
 Types of channel exit:
1. Security exit
2. Message exit
3. Send and receive exits
4. Message-retry exit
5. Channel auto-definition exit
© 2010 IBM Corporation
Dead-letters Queues (DLQ)
 Used if they cannot be routed to their correct destination.
 If no DLQ and message is left on the transmission queue or discarded (non-persistent) and
the channel is stopped.
 It can affect the sequence in which messages are delivered.
 Used if data-conversion errors occurs at the sending end of a channel
© 2010 IBM Corporation
How to get to the remote queue manager
 Multi-hopping
– to pass through one or more intermediate queue managers on the way to the target
queue manager
 Sharing channel
– messages from multiple applications to multiple remote queues can use the same
channel
 Using different channels
– Define another channel and another transmission queue and create a remote queue
definition specifying the location and the transmission queue name
 Using clustering
– Queue managers in a cluster can make the queues that they host available to every
other queue manager in the cluster.
© 2010 IBM Corporation
Multi-hopping
 Using other MQ server(s) in the middle
© 2010 IBM Corporation
Sharing channels
 Using same channels for the multiple remote queues
© 2010 IBM Corporation
Using different channels
 The use of channels is transparent to the application
Using remote queue definition, your applications must not specify the location (that is, the
destination queue manager) themselves
© 2010 IBM Corporation
Using Clustering
 Send to any other queue manager
© 2010 IBM Corporation
Dead-letter queue handler
 A routine to process messages on the DLQ regularly
 Invoke using the runmqdlq command
 Instructions for processing messages is using a user-written rules table
runmqdlq DLQ QMGR1 < qrule.rul
© 2010 IBM Corporation
What happens when a message cannot be delivered?
 MCA can process it in several ways:
– try again
Channel have following parameter to retry .
• Message retry count (MRRTY)
* Message retry interval (MRTMR)
– return-to-sender,
– put it on the dead-letter queue.
© 2010 IBM Corporation
LAB4: Explore distributed queuing
1. Create Queue Manager QM1
2. Create Local Queue Q1
3. Create Receiver Channel QM2.TO.QM1
4. Create Queue Manager QM2
5. Create Transmission Queue QM2.TO.QM1
6. Create Sender Channel QM2.TO.QM1 (the name
should be the same as receiver channel in QM1)
and specify the transmission queue name as you
created earlier
7. Create Remote Queue Q2, specify the remote
queue manager to QM1 and transmission queue as
you created earlier
QM2
Q2
QM2.TO.QM
1
Message
Channel
Agent
QM1
Q2
Message
Channel
Agent
QM2.TO.QM
1
Remote Queue
Defiition
Transmition
Queue
Sender Channel Receiver Channel
Local Queue
Connect queue managers using Sender-receiver channel pair
© 2010 IBM Corporation
WebSPHERE MQ ADMINISTRATION
© 2010 IBM Corporation
Category of Control Commands
Category Description
Queue manager
commands
commands for creating, starting, stopping, and deleting queue managers
and command servers
Channel commands commands for starting and ending channels and channel initiators
Utility commands • Utility commands include commands associated with: Running MQSC
commands
• Conversion exits
• Authority management
• Recording and recovering media images of queue manager resources
• Displaying and resolving transactions
• Trigger monitors
• Displaying the file names of WebSphere® MQ objects
• The File Transfer Application
Example:
crtmqm -u SYSTEM.DEAD.LETTER.QUEUE JKT1QM
© 2010 IBM Corporation
Using MQ Script (MQSC)
 to manage queue manager objects (queue manager itself, queues, process definitions,
channels, client connection channels, listeners, services, namelists, clusters, and
authentication information objects)
 The runmqsc command is used for issue MQSC commands to a queue manager
– Verify a command without running it
– Run a command on a local queue manager
– Run a command on a remote queue manager
 Running MQSC commands interactively
– MQSC commands are processed by the default queue manager: runmqsc
– MQSC commands are processed by specified queue manager: runmqsc QM1
– terminate command input explicitly by entering a semicolon (;)
 Running MQSC commands from text files, example:
– runmqsc < myprog.in
– runmqsc QM1 < myprog.in > myprog.out
© 2010 IBM Corporation
Using MQSC
 continuation characters
– A minus sign (-) indicates that the command is to be continued from the start of the following line.
– A plus sign (+) indicates that the command is to be continued from the first nonblank character on
the following line.
© 2010 IBM Corporation
MQSC Examples
 Displaying queue manager attributes
– DISPLAY QMGR
 Altering queue manager attributes
– ALTER QMGR DEADQ (ANOTHERDLQ) INHIBTEV (ENABLED)
 Defining a local queue
– DEFINE QLOCAL (ORANGE.LOCAL.QUEUE) +
DESCR('Queue for messages from other systems') +
PUT (ENABLED) + GET (ENABLED) + NOTRIGGER +
MSGDLVSQ (PRIORITY) +
MAXDEPTH (5000) +
MAXMSGL (4194304) + USAGE (NORMAL);
 Copying a local queue definition
– DEFINE QLOCAL (MAGENTA.QUEUE) LIKE (ORANGE.LOCAL.QUEUE)
 Changing local queue attributes
– Change single attribute: ALTER QLOCAL (ORANGE.LOCAL.QUEUE) MAXMSGL(10000)
– DEFINE QLOCAL (ORANGE.LOCAL.QUEUE) MAXMSGL(10000) REPLACE
 Clearing a local queue
– CLEAR QLOCAL (MAGENTA.QUEUE)
 Deleting a local queue
– DELETE QLOCAL (PINK.QUEUE) PURGE
© 2010 IBM Corporation
LAB 5 : Using Control Commands & MQSC Command
In this Lab, you will
Show list queue manager and its status
start, stop a queue manager (immediate shutdown,
preemtive shutdown)
Working with queue and queue alias
Use the control commands interactively
Use the control commands with a command file
Use the sample programs
© 2010 IBM Corporation
MQ Client
© 2010 IBM Corporation
 A component of the WMQ product that can be installed on a system on which no queue
manager runs.
 Available for platform:
– UNIX systems (AIX, HP-UX, Linux, Solaris)
– Windows
 Available as SupportPac and free under the standard terms and conditions
What is WebSphere MQ client
MQI Channel
(bi-directional)
© 2010 IBM Corporation
Why using MQ Client
 When to use MQ Client?
– There is no need for a full WebSphere MQ implementation on the client machine.
– Hardware requirements on the client system are reduced.
– System administration requirements are reduced.
– a WebSphere MQ application running on a client can connect to multiple queue
managers on different systems.
– Alternative channels using different transmission protocols can be used.
© 2010 IBM Corporation
Extended Transactional Client
a WebSphere MQ base client with the addition of the extended transactional function
 Allow a client application within the same unit of work to:
– To put messages to, and get messages from, queues that are owned by the queue
manager to which it is connected.
– To update the resources of a resource manager other than a WMQ queue manager, the
table of a database, for example.
 Client application then can commit (MQCMIT) or back out (MQBACK) the unit of work
 Queue manager act as transaction manager
© 2010 IBM Corporation
MQ Server vs Client
Feature Servers
Extended Transactional
Client
Standard Client
Provides Queue Manager? Yes No No
Enables Asynchronous Messaging? Yes No (1) No (1)
Queue operations within single Unit of
Work (UOW)?
Yes Yes (2) No
Manages Units of Work? Yes No (3) No
Workload management (Clustering
support)?
Yes No No
Runs on z/OS? Yes (4) No No
Licensing Server license required Server license required Free. Terms and
conditions apply
Availability Buy Installation option when installing
Server
CD or SupportPac
download
Free since V7.5
© 2010 IBM Corporation
MQI Channel
 MQI channel is bi-directional in term of flow of information
 2 types of MQI channel:
– CLNTCONN
– SVRCONN
 Started automatically by client application by issuing MQCONN or MQCONNX call
Stopped automatically by an MQDISC call
 There can be multiple instances of an MQI channel.
 Several clients can use the same SVRCONN channel.
© 2010 IBM Corporation
How to connect a client to a server
 The client must be able to identify which channel it should use to communicate with the
queue manager
 How to specify the client's connection to a queue manager:
– Explicitly on the MQCONNX verb
– MQSERVER variable
– Client channel tables (CCDT)
 Java client programs use either the MQEnvironment Java class or JNDI (using JMS)
© 2010 IBM Corporation
Defining MQI Channel (1)
Two methods of manually creating channel definition:
1. Create one channel definition on the client and the other on the server
 Define a server connection on the server, after creating & starting queue manager
DEFINE CHANNEL(CHANNEL1) CHLTYPE(SVRCONN) TRPTYPE(TCP) +
DESCR('Server-connection to Client_1')
 On the client system, there are two ways to specify channel:
• Set the environment variable MQSERVER with value
ChannelName/TransportType/ConnectionName(Port)
Example for Windows:
SET MQSERVER=CHANNEL1/TCP/9.20.4.56(1414)
• Define the definition of a client-connection channel in MQCD structure in MQCNO structure
on an MQCONNX call by MQ application
1
2
© 2010 IBM Corporation
Defining MQI Channel (2)
2. Define both the server connection and the client connection on the server system
 The client connection is stored in the client channel definition table (CCDT) on the server
system
 CCDT file name is AMQCLCHL.TAB
 CCDT file must be accessible by client or can be copied to client system
DEFINE CHANNEL(CHANNEL2) CHLTYPE(SVRCONN) TRPTYPE(TCP) +
DESCR('Server-connection to Client_2')
DEFINE CHANNEL(CHANNEL2) CHLTYPE(CLNTCONN) TRPTYPE(TCP) +
CONNAME(9.20.4.26) QMNAME(QM2) DESCR('Client-connection to Server_2')
 On the client system, set the environment variable as follow (example for Windows):
SET MQCHLLIB="C:IBMWebSphere MQ“
SET MQCHLTAB=AMQCLCHL.TAB
Note: MQSERVER environment variable should not be set, otherwise application will use
MQSERVER definition instead
© 2010 IBM Corporation
Auto-definition of channels
 Channel definition can be automatically created if there is an incoming request to start a
message channel or MQI channel, but no channel definition exists for the specific channel.
 The channel definition created automatically using system object as a model:
– SYSTEM.AUTO.RECEIVER for RCVR channels,
– SYSTEM.AUTO.SVRCONN for SVRCONN channels.
 The attribute ChannelAutoDef of the queue manager must be set to MQCHAD_ENABLED
– Updating the queue manager object using the ALTER QMGR command with the
parameter CHAD(ENABLED)
– Call PCF command Change Queue Manager with parameter ChannelAutoDef
© 2010 IBM Corporation
Precedence for connecting to a QMgr
 This is the precedence of the features provided by the MQ client for an application to
connect to a queue manager.
1.Pre-connect exit (introduced in MQ 7.1)
2.MQCONN API call
3.MQSERVER environment variable
4.mqclient.ini file (introduced in MQ 7.0)
5.CCDT file
© 2010 IBM Corporation
1. Pre-connect exit (7.1)
 Pre-connect exit (introduced in MQ 7.1)
 Can be used for MQ MQI clients to look up a repository to obtain connection definitions
 Allows to store the client definitions in a global repository like an LDAP directory
 This is the highest precedence.
– If it is available, then it will be used, superseding all other methods.
© 2010 IBM Corporation
2. MQCONN API call
 The MQCONN or MQCONNX call connects an application program to a queue
manager.
 It provides a queue manager connection handle, which the application uses on
subsequent message queuing calls.
 If the name of the queue manager is hardcoded in the application that uses a
Client transport type, then it supersedes the other methods: MQSERVER,
mqclient.ini and CCDT.
© 2010 IBM Corporation
2. MQCONN API call
 Example from the sample “amqsbcg0.c” which is used to browse messages from a
queue.
 The name of the queue manager is provided at runtime: amqsbcg Q1 QMGR1
/* variables for MQCONN */
MQCHAR QMgrName[MQ_Q_MGR_NAME_LENGTH];
MQHCONN Hconn = MQHC_UNUSABLE_HCONN;
MQLONG CompCode = MQCC_OK, Reason = MQRC_NONE;
…
QMgrName[0] = '0'; /* set to null default QM */
if (argc > 2) strncpy(QMgrName, argv[2], MQ_Q_MGR_NAME_LENGTH);
…
MQCONN(QMgrName,&Hconn,&CompCode,&Reason);
© 2010 IBM Corporation
2. MQCONN API Put/Get using Bindings
 Scenario: There are 2 client applications:
– one for putting a message into a queue, and
– another for getting a message
 The applications are located in the same host as the queue manager: HOST1
 Connect using a transport type of: BINDINGS
– local shared memory, no network is used
© 2010 IBM Corporation
Channel Exits
 NOT available to your application if MQSERVER environment variable is set.
 Available at both the client and the server end of the channel
 Channel Exits:
– Send exit
– Receive exit
– Security exit
 client-connection send and receive exits cannot make MQI calls
 A default path for location of the channel exits on the client is defined in a configuration file
 When a channel is initialized, after an MQCONN or MQCONNX call, ClientExitPath is read in
the config file and any channel exits that are specified in the channel definition are loaded.
© 2010 IBM Corporation
Client Channel Definition Tables (CCDT)
 Channel Definition Tables are used in all but the simplest of cases
 Can be used for connection to multiple queue managers
– Queue managers are specified in a "queue manager group"
 A channel definition table (CCDT) is:
• A binary file (not editable by a user)
• Created by an administrator when client channels are defined
• Allows connect options to be specified administratively
• Alternative is to use MQSERVER variable and MQCONNX options
• Somewhat analogous to Connection Factories with JMS or XMS
• In fact, a JMS Connection Factory can reference a CCDT
• Located in directory (by default):
• <mq root>qmgrsQMGRNAME@ipcc (Windows)
• <mq root/qmgrs/QMGRNAME/@ipcc (UNIX)
89 Using WebSphere MQ Clients
© 2010 IBM Corporation
 You have many MQ client applications in different hosts and you want to connect these
applications to different queue managers.
 If one of those queue managers is not available, then you want the application to try to
connect to another queue manager.
 You do not want to hardcode the connection data (queue manager name, channel, port) in
the application and you want a flexible way to provide the connection data to the
applications.
© 2010 IBM Corporation
Using Channel Definition Tables: Example 1
91 Using WebSphere MQ Clients
How is the QMNAME client channel attribute used?
def chl(chl1) chltype(clntconn) trptype(tcp) conname(host1) qmname(mars)
def chl(chl2) chltype(clntconn) trptype(tcp) conname(host2) qmname(venus)
mars
venus
MQCONN ("venus",hConn,cc,rc );
chl2
connected via channel chl2 to “venus"
MQ ClientAMQCLCHL.TAB
© 2010 IBM Corporation
Using Channel Definition Tables: Example 2
92 Using WebSphere MQ Clients
Multiple routes to the same Queue Manager
def chl(chl1) ….trptype(tcp) conname(host1) qmname(mars)
def chl(chl2) ….trptype(tcp) conname(tokenring) qmname(venus)
def chl(chl3) ….trptype(tcp) conname(ethernet) qmname(venus)
def chl(chl4) ….trptype(tcp) conname(dialup) qmname(venus)
mars
venus
MQCONN ("venus",hConn,cc,rc );
chl2
connected via channel chl3 to “venus"
MQ ClientAMQCLCHL.TAB
chl3
© 2010 IBM Corporation
Using Channel Definition Tables: Example 3
93 Using WebSphere MQ Clients
How do we have back-up Queue Managers ?
def chl(chl1) ….trptype(tcp) conname(ip.mars) qmname(planet)
def chl(chl2) ….trptype(tcp) conname(ip.venus) qmname(planet)
…..
def chl(chl5) ….trptype(tcp) conname(ip.pluto) qmname(planet)
mars
venus
MQCONN (“*planet",hConn,cc,rc );
Notice the ‘*’ preceding the Queue Manager name
MQ ClientAMQCLCHL.TAB
pluto
© 2010 IBM Corporation
How do I create and deploy a channel table ?
RUNMQSC
def chl(...) chltype(clntconn) ….
copy
c:mqmqmgrsQMGRNAME@ipcc
AMQCLCHL.TAB
to
z:mytable.tbl
© 2010 IBM Corporation
Using Channel Definition Tables: Example 4
95 Using WebSphere MQ Clients10/10/15
Name CHLTYPE TRPTYPE CONNAME QMNAME CLNTWGHT AFFINITY
chl1 CLNTCONN TCP ip.mars planet 4 PREFERRED
chl2 CLNTCONN TCP ip.venus planet 4 PREFERRED
chl3 CLNTCONN TCP ip.pluto planet 2 PREFERRED
MQCONN(*planet)
40%
40%
20%
mars
venus
pluto
© 2010 IBM Corporation
Limiting client connections
Starting MQSC for queue manager TEST1.
DEFINE CHANNEL(SALES.CONNECT) CHLTYPE(SVRCON
N) MAXINST(4) MAXINSTC(2)
Queue ManagerQueue Manager
SVRCONN
MAXINST(4)
MAXINSTC(2)
• MAXINST
• restricts the number of instances in total for
the specific channel name.
• MAXINSTC
• restricts the number of instances from a
specific IP address for that channel name.
© 2010 IBM Corporation
Client conversation (connection) sharing
 Client channels have three modes of operation:
– No multiplexing, no conversation sharing
• Separate socket for each MQ client conversation
• No multiplexing benefits
– Multiplexing, no conversation sharing
• Still a separate socket for each MQ client
conversation, but benefits of multiplexed channels
available
– Multiplexing AND conversation sharing
• MQ client conversations share a socket connection,
and can utilize benefits of multiplexed channels
Starting MQSC for queue manager TEST1.
DEFINE CHANNEL(SALES.CONNECT) CHLTYPE(SVRCONN)
SHARECNV(10)
DIS CHS(SALES.CONNECT)
AMQ8417: Display Channel Status details.
CHANNEL(SALES.CONNECT) CHLTYPE(SVRCONN)
CONNAME(127.0.0.1) CURRENT
MCAUSER(hughson) STATUS(RUNNING)
SUBSTATE(RECEIVE) CURSHCNV(3)
MAXSHCNV(10)
Queue ManagerQueue Manager
© 2010 IBM Corporation
Performance option - Client Read-Ahead
MQ Client/Server flows without Read-ahead of messages
Using WebSphere MQ Clients
ClientClient
MQCONN
MQOPEN
MQGET
MQGET
MQGET
ServerServer
●Each API request flows over the network
●The client blocks waiting for a reply
●For MQGet, each message is returned
over the network and passed to the
application
●Messages are never queued on the
client end
© 2010 IBM Corporation
Performance option - Client Read-Ahead
MQ Client/Server flows with Read-ahead of messages
ClientClient
MQCONN
MQOPEN
MQGET
MQGET
MQGET
ServerServer
Request
for ‘n’
messages
●Some API requests flow over the
network synchronously
●For MQGet, a batch of messages are
requested
●Messages are buffered on the client end
●Messages are passed to the application
individually from the client-side buffer
●Can result in significant
throughput improvement for
certain types of applications
In particular, applications that
stream messages to clients
© 2010 IBM Corporation
Performance option - Client Asynchronous Put
MQ Client/Server flows without Asynchronous Put
ClientClient
MQCONN
MQOPEN
MQOPEN
MQPUT
MQPUT
MQPUT
MQPUT
MQCMIT
ServerServer
●Each API request flows over the network
●The client blocks waiting for a reply
●For MQPut, each message is sent over
network to the queue manager
There it must be written to the queue
May also need to be logged
Then control returns to the application
© 2010 IBM Corporation
Performance option - Client Asynchronous Put
MQ Client/Server flows with Asynchronous Put
ClientClient
MQCONN
MQOPEN
MQOPEN
MQPUT
MQPUT
MQPUT
MQPUT
MQCMIT
ServerServer
● Some API requests flow over the network synchronously
● For MQPut, control is returned immediately to the application
Messages are buffered on the client end and forwarded to the
queue manager asynchronous to the client application
Status of each MQPut is
maintained on client end
● At commit, put requests are
reconciled with responses; if any
failed, unit-of-work is rolled back
Client app can optionally request
status of put messages
● Async Put can result in significant
throughput improvement for
certain types of applications
In particular, applications that
stream messages from clients
© 2010 IBM Corporation
MQ Client Security
 Two aspects to consider
– Authentication
• Since V7.1 introduced Channel Authentication Records (CHLAUTH)
• CHLAUTH will be enabled by default and has are three rules provided with a queue
manager
– DISPLAY QMGR CHLAUTH
– ALTER QMGR CHLAUTH(DISABLED)
• Blocked by CHLAUTH will result error message like AMQ9777: Channel was blocked
– Access control.
© 2010 IBM Corporation
MQ Client Security: Authentication
 3 Level Security
– Transport level
– Channel security exits
– Identification passed to a channel security exit
© 2010 IBM Corporation
Client Security - SSL
Client Server
DEF CHANNEL ('SYSTEM.DEF.SVRCONN')
CHLTYPE(SVRCONN)
SSLCAUTH(REQUIRED)
SSLCIPH('RC4_MD5_US')
SSLPEER('CN="*", O="IBM", C="US"')
Authentication,
Encryption, Integrity
DEF CHANNEL('SYSTEM.DEF.CLNTCONN')
CHLTYPE(CLNTCONN)
SSLCIPH('RC4_MD5_US')
SSLPEER('CN=“user", O="IBM",C="US"')
SSL facility
• key repository
• MQSSLKEYR
environment variable
SSL facility
• key repository
© 2010 IBM Corporation
Access Control
 Access control is based upon user IDs
 Access denied
– MQCC_FAILED
– MQRC_NOT_AUTHORIZED
 No connection handle is returned
ConnectionUser ID check.
Connection might be denied
Local Queue
Manager
© 2010 IBM Corporation
LAB 6 – WebSphere MQ Client Installation & Verification
In this Lab, you will
Find out how to get WebSphere MQ Client V7.5 (MQC75) from IBM site
Install WebSphere MQ Client installation on Windows
Verifying the installation by testing communication between a client and a server
– Setting up MQ Server for client connection
– Using sample program (amqsputc, amqsgetc)
© 2010 IBM Corporation
PUBLISH/SUBSCRIBE
© 2010 IBM Corporation
Point to Point Examples
108 Overview of Publish / Subscribe
●Message Queuing
If I put a single message it will go to a
single consumer
●eMail
Might go to lots of people but I get to
choose exactly who gets it
●Post Card
Goes to just the person I send it to
© 2010 IBM Corporation
Publish / Subscribe Examples
109 Overview of Publish / Subscribe
 Magazine Publishing
– In the US, over 10,000 titles published
 Airline Departure Boards
– Boards might display (subscribe to)
• All departures
• Departures from this terminal
• Departures by this airline
● RSS News Feeds
© 2010 IBM Corporation
Loose coupling with Pub/Sub
110 Overview of Publish / Subscribe
Publisher
Subscriber
Topic
Provider
Subscriber
Subscriber
Subscriber
Publisher Publisher
Publisher
Subscriber
Topic
Topic
Publisher
Publisher
Subscriber
Subscriber
Topic
1:1 1:many many:1 many:many
© 2010 IBM Corporation
WebSphere MQ Implementation of Publish/Subscribe
 Central concept is the TOPIC STRING
 Messages are “published” to a Topic string
– Each act of publishing is to a single Topic string
 Subscribers are delivered messages that were published to the Topic
string(s) they registered an interest in (subscribed to)
– Subscribers may register interest in multiple topics
– Wildcards can be used to filter topic names
– Selectors can be used to filter message properties
 Topic strings can be created and secured administratively, or dynamically
by simply being referenced by publishers and subscribers
111 Overview of Publish / Subscribe
© 2010 IBM Corporation
Publish/Subscribe applications
 Applications connect to local queue managers
 They can be different queue managers connected by a network.
 Can use JMS as well as any MQ API
 They are “connected” through a topic string
112 Overview of Publish / Subscribe
QM
QM
QM
Publishing
Application
Subscribing
Application
Subscribing
Application
QM
Subscribing
Application
Publish/Subscribe NetworkPublish/Subscribe Network
© 2010 IBM Corporation
Concepts – Topic String
 A Topic string is an unlimited length string
 A topic string “connects” publishers and subscribers
 Has a “structure” and a semantics in it
– The structure is supplied by the “/” slash character
– Similar to directory structure on UNIX®
or Windows®
• e.g. ”/news/sports/football/teams/minnesota”
 The semantics are implied by the use of wildcards in subscriptions
– “#” and ‘+’ are used as wildcard characters in subscriptions
• e.g. ”/news/+/football/#”
113 Overview of Publish / Subscribe
© 2010 IBM Corporation
Concepts – Topic Tree
114 Overview of Publish / Subscribe
 A topic tree is an internal
representation of the topic
hierarchy
 It has a root node at the very top
 It is implied from the complete set
of topic strings in use - defined,
published to, subscribed to.
 There is not necessarily a one-to-
one mapping between topic
objects and nodes in the tree
footballfinance
…
…
football/teams
football/teams/minnesota
“” (root)
© 2010 IBM Corporation
Concepts – Topic Object
 A Topic Object is a WebSphere MQ object that can be administered
 A Topic Object has a name following the same rules as other WebSphere
MQ objects (Queues etc)
 The Topic String is one of the properties of a Topic Object
– Topic Objects can have other properties set
 Security can be applied to Topic Objects
 Application programs using the MQI can use the topic object as a full or
partial alternative to topic string when publishing or subscribing
– JMS programs would use the Destination object, which maps to a
Topic or Queue object in WebSphere MQ
115 Overview of Publish / Subscribe
© 2010 IBM Corporation
Concepts – Topic Tree
116 Overview of Publish / Subscribe
 Nodes which have topic objects
defined for them can be thought
of as administered nodes
 They are permanent parts of the
hierarchy
 They can have properties
specified for them
 They have topic object names,
which need not reflect the topic
strings
DEFINE TOPIC(FOOTBALL) TOPICSTR(‘football’)
football
finance
…
…
football/teams
football/teams/minnesota
“” (root)
SYSTEM.BASE.TOPIC
FOOTBALL
MINN_TEAM
© 2010 IBM Corporation
Concepts – Topic Tree
117 Overview of Publish / Subscribe
 The Topic Tree can be
dynamically extended by a
publisher and/or subscriber
– Any missing parts of the tree
hierarchy will be “filled in” when
administered nodes are defined
 Dynamically added nodes in the
Topic Tree inherit all properties
from their parent, i.e. from an
administered node above them
Admin node
Non-admin node
Admin node
Non-admin node
footballfinance
…
…
football/teams
football/teams/minnesota
“” (root)
SYSTEM.BASE.TOPIC
FOOTBALL
MINN_TEAM
Node “football/teams”
automatically added.
© 2010 IBM Corporation
Concepts – Topic Tree
118 Overview of Publish / Subscribe
 Publishing or subscribing to a
topic string that is not yet in the
tree causes the tree to be
extended
 They are temporary parts of the
hierarchy and will be removed
when no remaining publishers or
subscribers exist
 These nodes inherit all
properties from their parent, and
so from an administered node
above them
MQSUB(‘/football/teams/greenbay/transfers’)
Admin node
Non-admin node
Admin node
Non-admin node
footballfinance
…
…
football/teams
football/teams/derby
“” (root)
SYSTEM.BASE.TOPIC
FOOTBALL
MINN_TEAMfootball/teams/greenbay
football/teams/greenbay/transfers
© 2010 IBM Corporation
Concept - Subscriptions
 A subscription is to a topic string
– Wildcards can be used to set them up, but in essence they are to a topic string
– Corresponds to a node in the topic tree
 Subscriptions can be durable, or not
– Non-durable subscriptions mean messages are delivered to you only while you are connected
– Messages for durable subscriptions are delivered even when disconnected, and can be retrieved
when you next connect
 Subscription destinations can be managed, or not
– With a managed destination a subscription queue is automatically created when you create a
subscription, and is tidied up automatically in accordance with the durability of the subscription
– With an unmanaged destination, you specify your own queue at the time the subscription is opened
 Subscriptions can be registered programmatically or administratively
119 Overview of Publish / Subscribe
© 2010 IBM Corporation
Concept - Retained Publications
 Most recent message published on a given topic
– Each node on the topic tree can have at most one Retained Publication
 Whether a publication is “retained” is determined at publish time by the
application program
 A subscriber can request, at anytime, the current retained publication for
a given topic
 Example StockPrice.CurrentPrice is a retained publication
– I can be notified whenever it changes – ticker tape
– Or I can request it at any time
120 Overview of Publish / Subscribe
120
© 2010 IBM Corporation
Administered Subscription
121 Overview of Publish / Subscribe
 Has a name conforming to usual MQ rules
– Sample attributes
• TOPICSTR – Topic string, basically
unlimited length
TOPICSTR( ‘/football/teams/#’)
• DEST – Name of object to which
messages for this subscription will
be forwarded
DEST(MY.QUEUE)
• DESTQMGR – Remote queue
manager to which messages are
forwarded
DESTQMGR(REMOTE.QMGR)
© 2010 IBM Corporation
Distributed Pub/Sub Topologies
 Two types of distributed Pub/Sub topologies are supported
–Publish/Subscribe Clusters
• Queue managers are connected using a “network” or “mesh” connectivity model
• MQ Clustering technology is used to provide connectivity between participating
queue managers
• Publications from any queue manager in the cluster may be subscribed to by any
other
• Enables multiple paths for publications, can eliminate single points of failure
–Publish/Subscribe Hierarchies
• Queue managers are arranged in a Parent/Child Hierarchy
• Each Queue manager may have only one Parent
• Queue managers may exchange Pub/Sub information directly between only their
parent or children
• This approach may require multiple hops and/or create single points of failure
 A Publish/Subscribe network can be created that combines both of these
topologies
122 Overview of Publish / Subscribe
© 2010 IBM Corporation
Example of a Publish/Subscribe Cluster
123 Overview of Publish / Subscribe
QM
QM
QM
Pub
Sub
Sub
QM Sub
•Consistent definitions in cluster
•Multiple routes across cluster
© 2010 IBM Corporation
Example of a Publish/Subscribe Hierarchy
124 Overview of Publish / Subscribe
QM
QM QM
QM QM QM QMPub Sub
© 2010 IBM Corporation
Publish/Subscribe in the WebSphere MQ Explorer
125 Overview of Publish / Subscribe
© 2010 IBM Corporation
Topic Objects
126 Overview of Publish / Subscribe
Topic Object Name
Topic String
• Topic Attributes are
associated with a Topic
Object
• The Topic Object is a
WebSphere MQ object
that can be
administered
• The Topic String is one
of the properties of a
Topic Object
• The topic string
“connects” publishers
and subscribers
• A Topic string is an
unlimited length string
• Topic Objects can have
other properties set
© 2010 IBM Corporation
Topic Status – current usage of topics
 DISPLAY TPSTATUS( topic-string )
– Topic attributes (TYPE(TOPIC))
• Number of publishers and subscribers
• Whether a retained publication exists
– Subscriber info (TYPE(SUB)):
• Last resume date of subscription and last message delivery time
• Number of messages sent to this subscriber
– Publisher info (TYPE(PUB)):
• Last publish time
• Number of messages published
127 Overview of Publish / Subscribe
© 2010 IBM Corporation
Administered Subscriptions
Overview of Publish / Subscribe128
•Subscriptions that are
administratively created
require a name
•A Topic Object can
optionally be referenced
•The Topic String is
required
•Wildcards may be used
•By definition, an
administered subscriptions
is durable
•Administered
subscriptions can use
either managed or
unmanaged destinations
Subscription
Object Name
Topic String
Topic Object Name
(optional)
Overview of Publish / Subscribe128
© 2010 IBM Corporation
Testing Publish and Subscribe
Overview of Publish / Subscribe129
© 2010 IBM Corporation
Benefits of Publish/Subscribe with WebSphere MQ
 Applications are more loosely coupled than with point-to-point
– No need to agree on queue names, number of receivers, etc
 Applications decide their message exchange patterns
– One-to-one
– One-to-many
– Many-to-one
– Many-to-many
 Messages are “published” to a Topic string
– Which can be created dynamically
– …or administratively for more control over security, etc
 Subscribers receive messages they registered an interest in
– Subscribers may register interest in multiple topics
– Wildcards can be used to filter topic names
– Selectors can be used to filter message properties
130 Overview of Publish / Subscribe
© 2010 IBM Corporation131
Lab 3 – WebSphere MQ Publish/Subscribe
Pub/Sub Administration Using the WebSphere MQ Explorer
● In the third lab you will explore Publish/Subscribe
administration using the MQ Explorer
Overview of Publish / Subscribe
© 2010 IBM Corporation
WebSphere MQ Application
© 2010 IBM Corporation
Application programming
 Message Queue Interface (MQI)
– a set of calls with which you can send and receive messages, and manipulate MQ
objects.
– a simple API that is consistent across all platforms
 MQ Objects:
– Queue managers
– Queues
– Administrative topic objects
– Namelists
– Services
– Listeners
– Process definitions
– Channels
– Storage classes (WebSphere® MQ for z/OS® only)
– Authentication information objects
© 2010 IBM Corporation
HP-UX Windows zLinux Solaris AIX OS/400 NSS OVMS
Programming Interface
zOS Linux
80+ platform configurations
WebSphere MQ
MQ Interface
COBOL, C, RPG,
VB, PL/1, TAL, others
Base Classes For Java
Java
XMS
C, C++, .NET C#
.NET (C#)
Microsoft
SOAP
Web Services
Other Interfaces
HTTP, FTP, …
Multiple APIs
– Supports the broadest range of APIs, programming languages
and OS platforms
– Provides the only JMS engine that can be implemented on
“any” standards-compliant JEE server
– Provides rich web services interfaces meeting customer
needs for WS-Reliability
© 2010 IBM Corporation
XMS Clients
a non-Java implementation of the Java Message Service (JMS) API
 Freely available for .NET and C/C++
 Can be downloaded as SupportPac
• IA9H: IBM Message Service Client (XMS) for .NET
http://www-01.ibm.com/support/docview.wss?uid=swg24011756
• IA94: IBM Message Service Client (XMS) for C/C++
http://www-01.ibm.com/support/docview.wss?uid=swg24007092
© 2010 IBM Corporation
Planning Your Design
 What types of queue should you use?
 Should you use shared queues and queue-sharing groups, and should you use queue-
sharing group clusters only?
 Should you use queue manager clusters?
 What types of message should you use?
 Should you use publish/subscribe or point-to-point messaging?
 How can you control your WebSphere MQ programs?
 Will your application run on a WebSphere MQ client?
 Will your application run on a WebSphere MQ server?
 How should you handle exceptions and errors?
© 2010 IBM Corporation
Design Your Message
 What type of message should I use?
 Should I assign different priorities to some of the messages that I create?
 Will my messages be discarded when the queue manager restarts?
 Do I want to give information about myself to the recipient of my messages?
 How many queues will receive my messages?
© 2010 IBM Corporation
The message queue interface (MQI) philosophy
 Simple call interface
 Limited number of calls
 Rich in function
 Sensible default and initial values
 Supplied “include” files and “copy” files for the definitions of structures and
constants
© 2010 IBM Corporation
Common MQI Calls
© 2010 IBM Corporation
Other common MQI Calls
MQPUT1 Opens a queue manager, places a message on the queue, and closes the
queue manager
MQINQ Queries the attributes of a WebSphere MQ object
MQSET Changes the attributes of a queue
MQCONNX Connects to a queue manager using the specified options
MQBEGIN Begins a unit of work coordinated by the queue manager
MQCMIT Commits all message PUT and GET operations made since the last
syncpoint
MQBACK Backs out all message PUT and GET operations made since the last
syncpoint
MQSUB Register subscriptions to a previously published topic
MQSUBR Request a retained publication
© 2010 IBM Corporation
 WebSphere MQ Application Programming Reference
MQPUT1 (Hconn, ObjDesc, MsgDesc, PutMsgOpts, BufferLength, Buffer,
CompCode, Reason)
 C equivalent
MQPUT1 (Hconn, &ObjDesc, &MsgDesc, &PutMsgOpts, BufferLength,
Buffer, &CompCode, &Reason);
 COBOL equivalent
CALL "MQPUT1" USING HCONN, OBJDESC, MSGDESC, PUTMSGOPTS,
BUFFERLENGTH, BUFFER, COMPCODE, REASON.
© 2010 IBM Corporation
MQCONN Call
© 2010 IBM Corporation
MQCONNX Call
© 2010 IBM Corporation
MQOPEN Call
© 2010 IBM Corporation
Queue definition and independence
Four types of queue that an
application can open:
•Local queues
•Remote queues (local definitions
of remote queues; cannot be
opened for input)
•Alias queues
•Model queues (used to create
queues dynamically)
© 2010 IBM Corporation
Model queue definition
© 2010 IBM Corporation
MQ Open share options
© 2010 IBM Corporation
MQPUT Calls
© 2010 IBM Corporation
MQGET Calls
© 2010 IBM Corporation
MQGET get message options
 Wait
 Set signal
 Browse from start of queue
 Browse from current position in queue
 Get message under browse cursor
 Within syncpoint control
 Outside of syncpoint control
 Accept truncated message
 Convert application data
© 2010 IBM Corporation
MQINQ Calls
© 2010 IBM Corporation
MQSET Calls
© 2010 IBM Corporation
PROGRAMMING
© 2010 IBM Corporation
Sample Function Documentation
 Syntax for MQCONN
– MQCONN (QMgrName, Hconn, CompCode, Reason)
 Parameters for MQCONN
The MQCONN call has the following parameters.
– QMgrName (MQCHAR48) – input
Queue manager names can contain certain characters, and there are other restrictions on their formation. You can
use special values of QMgrName to indicate a default queue manager, a queue-sharing group, or a choice of queue
managers.
– Hconn (MQHCONN) – output
– CompCode (MQLONG) – output
– Reason (MQLONG) – output
The reason code qualifying CompCode.
 Usage notes for MQCONN
Description of function usage
© 2010 IBM Corporation
Sample Function Documentation
 Language invocations for MQCONN
– C invocation
• MQCONN (QMgrName, &Hconn, &CompCode, &Reason);
• Declare the parameters as follows:
MQCHAR48 QMgrName; /* Name of queue manager */
MQHCONN Hconn; /* Connection handle */
MQLONG CompCode; /* Completion code */
MQLONG Reason; /* Reason code qualifying CompCode */
– COBOL invocation
• CALL 'MQCONN' USING QMGRNAME, HCONN, COMPCODE, REASON.
• Declare the parameters as follows:
** Name of queue manager
01 QMGRNAME PIC X(48).
** Connection handle
01 HCONN PIC S9(9) BINARY.
** Completion code
01 COMPCODE PIC S9(9) BINARY.
** Reason code qualifying COMPCODE
01 REASON PIC S9(9) BINARY.
– Other languages
© 2010 IBM Corporation
Connection Handle
 MQCONN(name, Hconn, …
 MQOPEN(Hconn, …
 MQPUT(Hconn, …
 MQGET(Hconn, …
 MQCLOSE(Hconn, …
 MQOPEN(Hconn, …
 MQPUT(Hconn, …
 MQGET(Hconn, …
 MQCLOSE(Hconn, …
 MQDICS(Hconn, …
 Unique. It is not intended to be
used by the program in any way
BUT to interface with the MQI
 Scope of the handle restricted to
smallest unit of parallel execution
– UNIX/Windows/Linux  Thead
– OS/400  Job
– DOS Client  System
– z/OS  CICS Task, IMS Task,
Batch/TSO Task
EXAMPLE
© 2010 IBM Corporation
Object Handle
 MQCONN(name, Hconn, …
 MQOPEN(Hconn,ObjDesc,Options,Hobj,…
 MQPUT(Hconn,Hobj,…
 MQGET(Hconn,Hobj,…
 MQCLOSE(Hconn,Hobj,…
 QOPEN(Hconn,ObjDesc,Options,Hobj,…
 MQPUT(Hconn,Hobj,…
 MQGET(Hconn,Hobj,…
 MQCLOSE(Hconn,Hobj,…
 MQDICS(Hconn, …
 The object handle represents the
access that has been
established to the queue
EXAMPLE
© 2010 IBM Corporation
More than one object handle
EXAMPLE
© 2010 IBM Corporation
Completion codes
 MQCC_OK
– The call completed fully; all output parameters have been set. The Reason parameter
always has the value MQRC_NONE in this case.
 MQCC_WARNING
– The call completed partially. Some output parameters might have been set in addition
to the CompCode and Reason output parameters. The Reason parameter gives
additional information about the partial completion.
 MQCC_FAILED
– The processing of the call did not complete. The state of the queue manager is
unchanged, except where specifically noted. The CompCode and Reason output
parameters have been set; other parameters are unchanged, except where noted.
© 2010 IBM Corporation
Reason codes
 The reason code parameter (Reason) qualifies the completion code parameter (CompCode)
• If CompCode is MQCC_OK:
 MQRC_NONE (0, X'000') No reason to report.
• If CompCode is MQCC_WARNING:
 MQRC_ALREADY_CONNECTED
(2002, X'7D2') Application already connected.
 MQRC_CLUSTER_EXIT_LOAD_ERROR
(2267, X'8DB') Unable to load cluster workload exit.
 MQRC_SSL_ALREADY_INITIALIZED
(2391, X'957') SSL already initialized.
• If CompCode is MQCC_FAILED
 MQRC_ADAPTER_CONN_LOAD_ERROR
(2129, X'851') Unable to load adapter connection module.
 MQRC_ADAPTER_DEFS_ERROR
 (2131, X'853') Adapter subsystem definition module not valid
ETC
© 2010 IBM Corporation
Transaction
EXAMPLE Before LUW committed :
•Message remain in Q1 and
marked for deletion but it is not
available to be retrieved by other
programs
•Inserted data in database is not
visible to other programs.
•Message has been put in Q2 is not
visible to other programs.
The current depth reflects these
messages but any attempt to use
MQGET to retrieve them fails with
MQRC_NO_MSG_AVAILABLE
If problem is encountered, all
activities associated with the
LUW can be backed out
© 2010 IBM Corporation
Local unit of work
 Syncpoint coordination using single phase commit provided by QM
 Start a unit of work by setting the syncpoint option for each message operation
– MQGET = MQGMO_SYNCPOINT
– MQPUT and MQPUT1 = MQPMO_SYNCPOINT
 Ending the unit of work:
– MQCMIT commits the operations
– MQBACK rolls back the operations
– MQDISC commits the operations
– Connection broken without MQDISC, a rollback happens.
MQPUT #with syncpoint opt
MQGET #with syncpoint opt
MQPUT #with syncpoint opt
If RC = O # no errors
MQCMIT #commit
Else #errors
MQBACK #rollback
© 2010 IBM Corporation
Global unit of work
 Different resource manager and their activities can be combined (e.g Database
operations)
 Coordinated by:
• Queue manager (internal syncpoint coordination)
Using MQBEGIN, MQCMIT, MQBACK
• External transaction manager
MQBEGIN, MQCMIT, MQBACK is not required.
Error code MQRC_ENVIRONMENT_ERROR if those functions called.
MQPMO_SYNCPOINT or MQGMO_SYNCPOINT should be specified for
MQPUT or MQGET
© 2010 IBM Corporation
MQBEGIN Calls
© 2010 IBM Corporation
MQCMIT calls
© 2010 IBM Corporation
MQBACK calls
 After rollback, any messages that had been retrieved using an MQGET in syncpoint will
have the BackoutCount incremented by one.
© 2010 IBM Corporation
Pseudo code - Transaction
DEFINE GET_OPTIONS AS MQGMO
DEFINE PUT_OPTIONS AS MQPMO
CALL MQCONN(...,
CALL MQOPEN(...,
GET_OPTIONS.Options = MQGMO_NO_WAIT + MQGMO_SYNCPOINT +
MQGMQAIL_IF_QUIESCING
CALL MQGET(...,
PUT_OPTIONS.Options = MQPMO_SYNCPOINT + MQPMO_FAIL_IF_QUIESCING
CALL MQPUT1(...,
CALL MQCMIT(...,
EXAMPLE
© 2010 IBM Corporation
Platform considerations for transaction
© 2010 IBM Corporation
Trigger Monitor
© 2010 IBM Corporation
Trigger conditions
 Trigger conditions is set up as part of queue definition
 Trigger when…
– First message arrived (TRIGTYPE=MQTT_FIRST)
– Some messages arrived (TRIGTYPE=MQTT_DEPTH, TRIGDPTH=X)
– Every message arrived (TRIGTYPE=MQTT_EVERY)
© 2010 IBM Corporation
Trigger message (MQTM)
 Trigger message format:
– MQTM,
– MQTMC  used only by AS/400
– MQTMC2
 Fields:
– Strucid
– Version
– QName
– ProcessName
– TriggerData
– ApplType (blank in TMC2)
– Applid
– EnvData
– UserData
– QMgrName (TMC2)
© 2010 IBM Corporation
Pseudo code - Trigger
DEFINE OBJJJESC AS MQOD
DEFINE PRIG AS MQTMC2
DEFINE CONN_HANDLE AS MQHCONN
DEFINE OBJ_HANDLE AS MQHOBJ
COPY INPUTPARAMETER TO TRIG
QMNAME = PRIG.QMgrName
QNANE = TRIG.QName
CALL MQCONN (QMNAME, CONN_HANDLE, . ..)
OBJ_DESC.ObjectName = QNAME
CALL MQOPEN(CONN_HANDLE, OBJ_DESC, ..., OBJ_HANDLE, ...)
CALL MQGEP (CONN_HANDLE, OBJ_HANDLE, ...)
EXAMPLE
© 2010 IBM Corporation
Data conversion
 Character data is being exchanged between platforms where the CodedCharSetId and
Encoding fields differ
 Performed by
– The queue manager
• Using MQXCNVC (convert characters) call
– User exit program
© 2010 IBM Corporation
Sample COBOL code: MQPUT
 http://localhost:49253/help/index.jsp?topic=/com.ibm.mq.csqzal.doc/fg18930_.htm
© 2010 IBM Corporation
PROGRAMMING USING JAVA
© 2010 IBM Corporation
WebSphere MQ
Java API Alternatives
 WebSphere MQ classes for Java Message Service (WebSphere MQ JMS)
 WebSphere MQ classes for Java (WebSphere MQ base Java)
MQ Interface (MQI)
Base Classes For Java
 MQ Classes for JMS
– Benefits:
• Provider-independence and standards
• Easy publish/subscribe
• Administrative configuration via JNDI
• Message selection
• Integration with J2EE Application Servers
 MQ Classes for Java
– Object oriented form of MQI
– Full access to MQ capabilities
• JMS has a few restrictions, such as no support for
distribution lists
© 2010 IBM Corporation
MQ Classes for Java
 Connection options
– As a WebSphere MQ MQI client using TCP/IP
– In bindings mode, connecting directly to WebSphere MQ using the JNI
• Mostly provides better performance
• Application must run on the same system as the queue manager
 Contains in com.ibm.mq.jar & com.ibm.mq.jmqi.jar
 Lib directory
– MQ_INSTALLATION_PATHjavalib or lib64
 Sample directory
– Unix/Linux: MQ_INSTALLATION_PATH/samp/wmqjava/
– Windows: MQ_INSTALLATION_PATHtoolswmqjava
© 2010 IBM Corporation
Sample Java code: MQ Classes for Java
Sample can be found in <INSTALL_DIR>/tools/wmqjava/samples
MQQueueManager qMgr = new MQQueueManager(“QMANAGER1”);
int openOptions = MQConstants.MQOO_INPUT_AS_Q_DEF |
MQConstants.MQOO_OUTPUT;
MQQueue queue = qMgr.accessQueue("QUEUE1", openOptions);
MQMessage msg = new MQMessage();
msg.writeUTF("Hello, World!");
MQPutMessageOptions pmo = new MQPutMessageOptions();
queue.put(msg, pmo);
Create a connection to the
QueueManager
Set up the options on the
queue we wish to open
Now specify the queue that
we wish to open and the
open options
Define a simple WebSphere
MQ Message
Specify the default put
message options
Put the message to the
queue
© 2010 IBM Corporation
Sample Java code (cont’d)
MQMessage msg = new MQMessage();
MQGetMessageOptions gmo = new MQGetMessageOptions();
queue.get(msg, gmo);
String msgText = msg.readUTF();
queue.close();
qMgr.disconnect();
Define a WebSphere MQ
message to receive the data
Specify default get
message options
Get the message off the
queue and read the text
from message
Close the queue
Disconnect from the
QueueManager
© 2010 IBM Corporation
LAB 8: Programming with MQ Classes for Java
 In this Lab, you will learn:
– Using Eclipse to setup Java project for MQ application
– Creating Java application using sample code to GET and PUT data from/into a queue
© 2010 IBM Corporation
Java Message Service (JMS) - Overview
 JMS is the standard Java API for messaging
– Point-to-point messaging domain
– Publish/subscribe messaging domain
 Vendor-independent Messaging API in Java
– Specification owned by Sun Microsystems
– Managed by The Java Community Process
– Expert Group includes IBM
 Part of Java 2 Enterprise Edition 1.3 and later
 Defines package of Java Interfaces
– Gives provider-independence
– Does not give provider interoperability
• A standard API, not a standard ‘wire format’
© 2010 IBM Corporation
JMS for WebSphere MQ
WebSphere
MQ Server
JMS
Application
JMS layer
JAVA layer
MQI
Application
MQI
Pub/Sub Broker
WebSphere
MQ ServerMQ Protocol
JVM
JMS
Application
JMS layer
JAVA layer
JVM
MQI
Application
MQI
MQI
MQI
© 2010 IBM Corporation
JMS Key Concepts - Architecture
© 2010 IBM Corporation
 Connection Factory: An
administered object that creates a
connection to the provider's
underlying messaging system.
 Connection: An active connection
to a provider.
 Session: A single-threaded context
for sending and receiving messages.
 Message Producer: Used for
sending messages.
 Message Consumer: Used for
receiving messages.
 Destination: An administered object
that encapsulates the identity of a
message destination, such as where
messages are sent to or received
from.
© 2010 IBM Corporation
JMS 1.1 Unified Interfaces
© 2010 IBM Corporation
Point to Point Messaging
© 2010 IBM Corporation
Point to Point Sample Code
© 2010 IBM Corporation
Publish/Subscribe Messaging
 NB This example shows JMS 1.0.2 Interfaces
© 2010 IBM Corporation
Publish/Subscribe Sample Code
© 2010 IBM Corporation
JMS Message
 Header Fields
– MessageId, CorrelationId
– Destination, ReplyTo
– Priority, Timestamp, Expiry
– …
 Properties – Name/Value pairs
– JMSX – Extended, optional header fields
– JMS_<Vendor> – Vendor-specific
metadata
– User – Application-defined metadata
 Body
– Text – Textual character data
– Bytes – Raw byte stream
– Map – Collection of named, typed fields
– Stream – Sequence of typed fields
© 2010 IBM Corporation
JMS Message Format for WebSphere MQ
Data
JMS Message
JMS Client
RFH2
Other Data
MQ Message
Data
Data
JMS Message
JMS Client
Mapping Mapping
Copying Copying
Header
MQMD
PropertiesProperties
Header
© 2010 IBM Corporation
Additional Features of JMS
 Message Listener
 Exception Listener
 Temporary Destinations
 Selector
– outMessage.setJMSPriority(7);
– outMessage.setStringProperty(“postcode”, “SO21 2JN”);
– session.createMessageConsumer(queue,“postcode LIKE ‘SO21%’ OR JMSPriority < 3”);
 Queue Browser
 Unidentified Producer
– Destination specified on send() rather than on creation
 Requestor
 Application Server Facilities
 XA Support
© 2010 IBM Corporation
JMS Sessions
 Session / QueueSession / TopicSession
 Connection.createSession(boolean transacted, int acknowledgeMode);
– transacted :
• true – client will issue commit/rollback calls
• false – auto-commit
– acknowledgeMode :
• AUTO_ACKNOWLEDGE
• DUPS_OK_ACKNOWLEDGE
• CLIENT_ACKNOWLEDGE
• (SESSION_TRANSACTED)
© 2010 IBM Corporation
LAB 9: Setting up JMS Provider
 In this Lab, you will learn:
– Configuring the WebSphere MQ JMS Provider using MQ Explorer
• Create Connection Factory
• Create JMS Destination
– Test JMS application to connection to MQ Server and put message on queue
– Explore JMS sample codes
© 2010 IBM Corporation
Coding in Java EE/J2EE Application
 Solution Alternatives:
– WebSphere MQ classes for Java Message Service (JMS)
– WebSphere MQ classes for Java (WMQ base Java)
– WebSphere MQ JCA resource adapter
http://www-01.ibm.com/support/docview.wss?uid=swg27009524
 WebSphere MQ base Java API has restrictions when
being used within a J2EE/JEE environment
 Check the System Requirements document!
http://www-01.ibm.com/support/docview.wss?uid=swg27011920
© 2010 IBM Corporation
WebSPHERE MQ SECURITY
© 2010 IBM Corporation
 Ensure each user is uniquely identified
– Identification:- Being able to uniquely identify a user of a system or an application that is
running in the system.
 Prove that a user is who they say they are
– Authentication:- Being able to prove that a user or application is genuinely who that
person or what that application claims to be.
 Limit Access to authorised users only
– Access Control:- Protects critical resources in a system by limiting access only to
authorised users and their applications. It prevents unauthorised use of a resource or the
use of a resource in an unauthorised manner.
 Track who does what to what and when
– Auditing:- Tracking who has done what to what and when
© 2010 IBM Corporation
 Protect your sensitive data from unauthorised viewing
– Confidentiality:- Protects sensitive information from unauthorised disclosure.
 Check unauthorised changes have not been made to data
– Data Integrity:- Detects whether there has been unauthorsied modification of
data. There are two ways in which this can occur, accidentally, through
hardware or transmission errors, or by deliberate attack.
 Ensure a message really is associated with whom it claims
– 'Non-Repudiation':- The goal is usually to prove that a particular message is
associated with a particular individual.
© 2010 IBM Corporation
Identification
 Identification
– O/S User IDs
– Context
– Link-level considerations (later)
What is Context information?
© 2010 IBM Corporation
Authentication - MQCONNX
 MQCSP structure in the Connection
Options (MQCNO structure)
– Connection Security Parameters
– User ID and password
 MQCSP passed to
– Object Authority Manager (OAM)
– Security Exit
 OAM is authorization service that can
use to identify and authenticate the
user.
 The OAM authorizes users based on
the ID contained in the MQCSP but
does not validate the password
MQCSP csp = {MQCSP_DEFAULT};
csp.AuthenticationType = MQCSP_AUTH_USER_ID_AND_PWD;
csp.CSPUserIdPtr = “hughson”;
csp.CSPUserIdLength = 7;
csp.CSPPasswordPtr = “12345”;
csp.CSPPasswordLength = 5;
MQCNO cno = {MQCNO_DEFAULT};
cno.Version = MQCNO_VERSION_5;
cno.SecurityParmsPtr = &csp;
MQCONNX(QMName, &cno, &hConn, &CompCode, &Reason);
To implement password validation in the
authorization service
•by using chained exits with the OAM,
•by replacing the OAM with an alternative
authorization service.
© 2010 IBM Corporation
Access Control – Administering WebSphere MQ
New in V7.1
© 2010 IBM Corporation
Controling Access to Object (1)
 Command:
setmqaut -m QMgrName -n ObjectProfile -t Type -g GroupName Action
– Type: queue, topic, channel, qmgr, process, namelist, service
– Action:
• +chg, +clr, +crt, +dlt, +dsp. +ctrl
• +alladm = +chg +clr +dlt +dsp
 Showing access:
– dspmqaut -m QMgrName -t qmgr -g GroupName
– dspmqaut -m QMgrName -n QueueName -t q -p UserName
© 2010 IBM Corporation
Read-only access to all resource in Queue Manager
 Read-only access to all resource in Queue Manager
setmqaut -m QMgrName -n "**" -t queue -g GroupName +browse +dsp
setmqaut -m QMgrName -n SYSTEM.ADMIN.COMMAND.QUEUE -t queue -g GroupName +dsp +inq +put
setmqaut -m QMgrName -n SYSTEM.MQEXPLORER.REPLY.MODEL -t queue -g GroupName +dsp +inq +get
setmqaut -m QMgrName -n "**" -t topic -g GroupName +dsp
setmqaut -m QMgrName -n "**" -t channel -g GroupName +dsp
setmqaut -m QMgrName -n "**" -t clntconn -g GroupName +dsp
setmqaut -m QMgrName -n "**" -t authinfo -g GroupName +dsp
setmqaut -m QMgrName -n "**" -t listener -g GroupName +dsp
setmqaut -m QMgrName -n "**" -t namelist -g GroupName +dsp
setmqaut -m QMgrName -n "**" -t process -g GroupName +dsp
setmqaut -m QMgrName -n "**" -t service -g GroupName +dsp
setmqaut -m QMgrName -t qmgr -g GroupName +dsp +inq +connect
© 2010 IBM Corporation
Full admin access to all resource in Queue Manager
 Full admin access to all resource in Queue Manager
– setmqaut -m QMgrName -n "**" -t queue -g GroupName +alladm +browse
– setmqaut -m QMgrName -n @class -t queue -g GroupName +crt
– setmqaut -m QMgrName -n SYSTEM.ADMIN.COMMAND.QUEUE -t queue -g GroupName +dsp +inq +put
– setmqaut -m QMgrName -n SYSTEM.MQEXPLORER.REPLY.QUEUE -t queue -g GroupName +dsp +inq +get
– setmqaut -m QMgrName -n "**" -t topic -g GroupName +alladm
– setmqaut -m QMgrName -n @class -t topic -g GroupName +crt
– setmqaut -m QMgrName -n "**" -t channel -g GroupName +alladm
– setmqaut -m QMgrName -n @class -t channel -g GroupName +crt
– setmqaut -m QMgrName -n "**" -t clntconn -g GroupName +alladm
– setmqaut -m QMgrName -n @class -t clntconn -g GroupName +crt
– setmqaut -m QMgrName -n "**" -t authinfo -g GroupName +alladm
– setmqaut -m QMgrName -n @class -t authinfo -g GroupName +crt
– setmqaut -m QMgrName -n "**" -t listener -g GroupName +alladm
– setmqaut -m QMgrName -n @class -t listener -g GroupName +crt
– setmqaut -m QMgrName -n "**" -t namelist -g GroupName +alladm
– setmqaut -m QMgrName -n @class -t namelist -g GroupName +crt
– setmqaut -m QMgrName -n "**" -t process -g GroupName +alladm
– setmqaut -m QMgrName -n @class -t process -g GroupName +crt
– setmqaut -m QMgrName -n "**" -t service -g GroupName +alladm
– setmqaut -m QMgrName -n @class -t service -g GroupName +crt
– setmqaut -m QMgrName -t qmgr -g GroupName +alladm +conn
© 2010 IBM Corporation
CHLAUTH rules – Default rules on new Queue Managers
 Channel authentication records should be enabled
• ALTER QMGR CHLAUTH(ENABLED)
 Display CLHAUTH
– DIS QMGR CHLAUTH
– DIS CHLAUTH(*)
 Default rules on new Queue Managers
1)set chlauth(‘*’) type(BLOCKUSER) USERLIST(‘*MQADMIN’)
• block all users that are in the MQ admin group, from connecting to the queue manager
1)set chlauth(‘SYSTEM.*’) type(ADDRESSMAP) ADDRESS(‘*’) USERSRC(NOACCESS)
• block connections to the queue manager, using any of the SYSTEM. channels that are predefined
1)set chlauth(SYSTEM.ADMIN.SVRCONN) type(ADDRESSMAP) ADDRESS(‘*’) USERSRC(CHANNEL)
• allow connections to the queue manager, using SYSTEM.ADMIN.SVRCONN (MQ Explorer
connections)
© 2010 IBM Corporation
Access Right to Connect to Queue Manager
 Mapping a remote queue manager to an MCAUSER user ID
–SET CHLAUTH('generic-channel-name') TYPE (QMGRMAP) QMNAME(generic-partner-qmgr-name) USERSRC(MAP)
MCAUSER(user)
 Mapping a client asserted user ID to an MCAUSER user ID
–SET CHLAUTH('generic-channel-name') TYPE (USERMAP) CLNTUSER(client-user-name) USERSRC(MAP)
MCAUSER(user)
 Mapping an IP address to an MCAUSER user ID
–SET CHLAUTH('generic-channel-name') TYPE(ADDRESSMAP) ADDRESS('generic-ip-address') USERSRC(MAP)
MCAUSER(user)
–Example:
• SET CHLAUTH(TEST_CHANNEL) TYPE(ADDRESSMAP) ADDRESS(*) MCAUSER('mq-user')
• It says the following:
– For connections requesting TEST_CHANNEL...
– Originating from any IP address...
– Set the MCAUSER to mq-user
Note: generic-channel-name = * means all channel
© 2010 IBM Corporation
 Blocking specific user IDs
• SET CHLAUTH('generic-channel-name') TYPE(BLOCKUSER) USERLIST(userID1, userID2)
 Blocking specific IP addresses
• SET CHLAUTH('generic-channel-name') TYPE(BLOCKADDR) ADDRLIST('1.2.3.4')
• SET CHLAUTH('generic-channel-name') TYPE(ADDRESSMAP) ADDRESS('1.2.3.4') USERSRC(NOACCESS)
 Block all except specified IP addresses
– SET CHLAUTH( '*') TYPE(ADDRESSMAP) ADDRESS( '*') USERSRC(NOACCESS) DESCR( 'Block all addresses')
– SET CHLAUTH( '*') TYPE(ADDRESSMAP) ADDRESS( ‘ip-addresses') USERSRC(MAP) MCAUSER( ‘username')
 Allow IP address without mapping the User ID to MCAUSER
– SET CHLAUTH('*') TYPE(ADDRESSMAP) ADDRESS(‘ip-address') USERSRC(CHANNEL)
 See what MCAUSER all your channels are currently running
– DISPLAY CHSTATUS(chl-name) MCAUSER
Note: You cannot specify MCAUSER('*').
© 2010 IBM Corporation
Auditing
Distributed Platforms
MQRC_NOT_AUTHORIZED events written to SYSTEM.ADMIN.QMGR.EVENT queue
The event showing specifically what kind of access was attempted and different reason
qualifier recorded in the event message.
– MQRQ_CONN_NOT_AUTHORIZED
– MQRQ_OPEN_NOT_AUTHORIZED
– MQRQ_CLOSE_NOT_AUTHORIZED
– MQRQ_CMD_NOT_AUTHORIZED
– MQRQ_SUB_NOT_AUTHORIZED
– MQRQ_SUB_DEST_NOT_AUTHORIZED
© 2010 IBM Corporation
List Connections
 DISPLAY CONN(*) ALL
AMQ8276: Display Connection details.
CONN(AB548F5220032801)
EXTCONN(414D5143514D2E544553542020202020)
TYPE(CONN)
PID(20964) TID(13)
APPLDESC(WebSphere MQ Channel) APPLTAG(MQ Explorer 7.5.0)
APPLTYPE(SYSTEM) ASTATE(STARTED)
CHANNEL(SVRCONN.MQOPR) CONNAME(127.0.0.1)
CONNOPTS(MQCNO_HANDLE_SHARE_BLOCK,MQCNO_SHARED_BINDING)
USERID(mqopr) UOWLOG( )
UOWSTDA( ) UOWSTTI( )
UOWLOGDA( ) UOWLOGTI( )
URTYPE(QMGR)
EXTURID(XA_FORMATID[] XA_GTRID[] XA_BQUAL[])
QMURID(0.0) UOWSTATE(NONE)
© 2010 IBM Corporation
Problem Determination & Troubleshooting
© 2010 IBM Corporation
Questions when problem occurs
 Has WebSphere MQ run successfully before?
 Are there any error messages?
 Does the Windows Application Event Log show any WebSphere MQ errors? (Windows only)
 Are there any return codes explaining the problem?
 Can you reproduce the problem?
 Have any changes been made since the last successful run?
 Has the application run successfully before?
© 2010 IBM Corporation
Troubleshooting
 Check the channel
– View channel status: DIS CHS(*) STATUS
• “AMQ8420: Channel Status not found” may resulted long interval of inactivity.
The receiver channel status will not be displayed until the channel is started
on the sending side.
– Find channel in-doubt status: DIS CHS(*) INDOUBT
• In-doubt status (and the units of work involved) are resolved automatically between
MCAs when a channel is restarted.
• Resolve manually:
RESOLVE CHANNEL(CHNAME) ACTION(COMMIT | BACKOUT )
RESET CHANNEL
– Find out more: DIS CHS(*) SUBSTATE
© 2010 IBM Corporation
Troubleshooting DLQ
 When messages are placed onto the Dead Letter Queue (such as
SYSTEM.DEAD.LETTER.QUEUE), a special header is attached to the message giving
information on why the message has been put onto the queue (reason code).
 Troubleshoot using command: amqsbcg DLQ QM1 > amqsbcg.txt
Location:
– WMQ_INSTALL_DIRtoolscSamplesBin (Windows)
– /opt/mqm/samp/bin (UNIX)
© 2010 IBM Corporation
Troubleshooting DLQ
• 5th and 6th pairs from the Left is
Reason Code.
© 2010 IBM Corporation
Troubleshooting DLQ
• Use mqrc command to know the Reason Code, can use hexadecimal or decimal
• For Unix (except for Linux on x86 – Intel): mqrc 0x000007F3
• For Linux or Windows on x86 the Reason Code is in little-endian format (low-order bytes
first). Example: 0A01 0000  0000 010A  266 in decimal
Command: mqrc 266
• Example result:
• 2085 0x00000825 MQRC_UNKNOWN_OBJECT_NAME
• 2035 0x000007f3 MQRC_NOT_AUTHORIZED
• It is far easier to find out the reason code by browsing a message from the DLQ via MQ
Explorer. It handles the swapping of bytes according to platform.
• You can do reverse lookup via mqrc: mqrc MQRC_UNKNOWN_OBJECT_NAME
© 2010 IBM Corporation
Error Log
 Error log locatoin:
– /var/mqm/errors
– /var/mqm/qmgrs/<queueManagerName>/errors
– /var/mqm/qmgrs/@SYSTEM/errors (not used at V6 and higher)
 Error log files: AMQERR01.LOG, AMQERR02.LOG and AMQERR03.LOG
 Find FFST record in FDC file: AMQnnnnnnnn_mm.FDC
nnnnnnnn Is the process id reporting the error
 Run command: ffstsummary
© 2010 IBM Corporation
Killing queue managers process
 The first process to end is amqzmuc0 – the critical process manager. This contains the
logger, and ending it prevents any further transactional work.
 The next process to end is amqzxma0 – the execution controller. The execution controller
identifies when other processes die. Stopping this prevents it from producing a pile of
“Process X has died” FFST error reports as they are ended. It also prevents any new
connections being made to the queue manager.
 At the other end of the list is amqpcsea – the command server. By this point in the list,
these are processes which do not access any critical queue manager resources, so can be
safely left until last.
© 2010 IBM Corporation
Checking OS resource
 Use mqconfig script to know how to tune the operating system, including user limits and
kernel parameters for resources like shared memory and semaphores.
 http://www-01.ibm.com/support/docview.wss?uid=swg21271236#mqconfig
© 2010 IBM Corporation
Escalate problem to IBM Support – Creating PMR
 Make sure you know your IBM Customer Number
 Call IBM WebSphere Support (http://www.ibm.com/planetwide/id/)
Tel: +62-21- 2992 5555
Tel: 1-803-422-291
– Customer name, IBM Customer number
– Software name and version & fix pack level
– OS version & fix pack level
– Brief description of the problem
– Severity of the problem: 1 is the highest (need 24 hours contactable number)
 You will get PMR number and IBM Support engineer will contact you via email/phone
© 2010 IBM Corporation
Collect MustGather
 http://www-01.ibm.com/support/docview.wss?uid=swg21229861
 Collect IBM MQ MustGather data when you first open a problem record so you can provide
IBM support the information they need to investigate the problem. Start by selecting the
category which best matches the problem on your system:
© 2010 IBM Corporation
What next?
© 2010 IBM Corporation
SupportPac
MA46: WebSphere MQ Java client for iSeries V7.0
MA6O: WebSphere MQ - UNIX Administration Tool
MH04: WebSphere MQ - Queue Statistics Tool
MQC7: WebSphere MQ V7.0 Clients
MA96: WebSphere MQ - Message Browser
MS0T: WebSphere MQ Explorer
MS0Q: WebSphere MQ Explorer Publish/Subscribe
plug-in
MS0S: WebSphere MQ Explorer MQSC Editor Plug-in
MS0P: WebSphere MQ Explorer - Configuration and
Display Extension Plug-ins
MO71: WebSphere MQ for Windows GUI
Administrator
MSL1: WebSphere MQ for Linux - Automatic Startup
MS0P: WebSphere MQ Explorer - Configuration and
Display Extension Plug-ins
MA0T: WebSphere MQ - Message Test Utility
MA0Y: WebSphere MQ Bridge for HTTP
http://www-01.ibm.com/support/docview.wss?uid=swg27007197#1
Check SupportPacs web page to find tools/document that might help you.
© 2010 IBM Corporation
Cat2 ME02: Search Plug-in
© 2010 IBM Corporation
Cat2 MS0P: Events and Stats Plug-in
Now with Command Events!
© 2010 IBM Corporation
Cat2 MS0P: Using Trace-route
© 2010 IBM Corporation
Cat3 IS02: Message Broker Admin Plug-in
© 2010 IBM Corporation
Multi-instance queue managers: How it looks
 As a graphical example, SupportPac MS0P V7.0.1
© 2010 IBM Corporation
HTTP Connectivity to WMQ
 Easy access to MQ resources from any device with an HTTP interface
 Extends the scope beyond traditional systems
 Alternative implementation as SupportPac MA94
MQ HTTP Bridge
MQ
JCA +
JMS
http://mq.com:1415/msg/
queues/myQ
topics/stocks/IBM
HTTP: POST /
GET / DELETE
libwww
Web
Browsers
Javascript
AJAX
HTTP
clients
JEE Application Server
Java
SVRCONN
CHANNEL
MQ Bindings
Connection
MQ JMS
client
connection
Queue Manager
© 2010 IBM Corporation
Learning Resource
© 2010 IBM Corporation
developerWorks
© 2010 IBM Corporation
InfoCenter: WebSphere MQ Documentation
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r1/index.jsp?topic=%2Fcom.ibm.mq.doc%2Fzl00000_.htm

Contenu connexe

Tendances

IBM MQ Online Tutorials
IBM MQ Online TutorialsIBM MQ Online Tutorials
IBM MQ Online TutorialsBigClasses.com
 
IBM MQ - What's new in 9.2
IBM MQ - What's new in 9.2IBM MQ - What's new in 9.2
IBM MQ - What's new in 9.2David Ware
 
An Introduction to the Message Queuing Technology & IBM WebSphere MQ
An Introduction to the Message Queuing Technology & IBM WebSphere MQAn Introduction to the Message Queuing Technology & IBM WebSphere MQ
An Introduction to the Message Queuing Technology & IBM WebSphere MQRavi Yogesh
 
Deploying and managing IBM MQ in the Cloud
Deploying and managing IBM MQ in the CloudDeploying and managing IBM MQ in the Cloud
Deploying and managing IBM MQ in the CloudRobert Parker
 
Controlling access to your IBM MQ System
Controlling access to your IBM MQ SystemControlling access to your IBM MQ System
Controlling access to your IBM MQ SystemRobert Parker
 
Building an Active-Active IBM MQ System
Building an Active-Active IBM MQ SystemBuilding an Active-Active IBM MQ System
Building an Active-Active IBM MQ Systemmatthew1001
 
IBM MQ - High Availability and Disaster Recovery
IBM MQ - High Availability and Disaster RecoveryIBM MQ - High Availability and Disaster Recovery
IBM MQ - High Availability and Disaster RecoveryMarkTaylorIBM
 
IBM Integration Bus & WebSphere MQ - High Availability & Disaster Recovery
IBM Integration Bus & WebSphere MQ - High Availability & Disaster RecoveryIBM Integration Bus & WebSphere MQ - High Availability & Disaster Recovery
IBM Integration Bus & WebSphere MQ - High Availability & Disaster RecoveryRob Convery
 
IBM WebSphere Application Server (Clustering) Concept
IBM WebSphere Application Server (Clustering) ConceptIBM WebSphere Application Server (Clustering) Concept
IBM WebSphere Application Server (Clustering) Conceptejlp12
 
IBM Think 2018: IBM MQ High Availability
IBM Think 2018: IBM MQ High AvailabilityIBM Think 2018: IBM MQ High Availability
IBM Think 2018: IBM MQ High AvailabilityJamie Squibb
 
IBM MQ cloud architecture blueprint
IBM MQ cloud architecture blueprintIBM MQ cloud architecture blueprint
IBM MQ cloud architecture blueprintMatt Roberts
 
IBM MQ: Managing Workloads, Scaling and Availability with MQ Clusters
IBM MQ: Managing Workloads, Scaling and Availability with MQ ClustersIBM MQ: Managing Workloads, Scaling and Availability with MQ Clusters
IBM MQ: Managing Workloads, Scaling and Availability with MQ ClustersDavid Ware
 
IBM MQ - better application performance
IBM MQ - better application performanceIBM MQ - better application performance
IBM MQ - better application performanceMarkTaylorIBM
 
IBM WebSphere MQ: Managing Workloads, Scaling and Availability with MQ Clusters
IBM WebSphere MQ: Managing Workloads, Scaling and Availability with MQ ClustersIBM WebSphere MQ: Managing Workloads, Scaling and Availability with MQ Clusters
IBM WebSphere MQ: Managing Workloads, Scaling and Availability with MQ ClustersDavid Ware
 
Designing IBM MQ deployments for the cloud generation
Designing IBM MQ deployments for the cloud generationDesigning IBM MQ deployments for the cloud generation
Designing IBM MQ deployments for the cloud generationDavid Ware
 
New Tools and Interfaces for Managing IBM MQ
New Tools and Interfaces for Managing IBM MQNew Tools and Interfaces for Managing IBM MQ
New Tools and Interfaces for Managing IBM MQMatt Leming
 
IBM Websphere concepts
IBM Websphere conceptsIBM Websphere concepts
IBM Websphere conceptsKuldeep Saxena
 
IBM MQ: An Introduction to Using and Developing with MQ Publish/Subscribe
IBM MQ: An Introduction to Using and Developing with MQ Publish/SubscribeIBM MQ: An Introduction to Using and Developing with MQ Publish/Subscribe
IBM MQ: An Introduction to Using and Developing with MQ Publish/SubscribeDavid Ware
 
Websphere Application Server V8.5
Websphere Application Server V8.5Websphere Application Server V8.5
Websphere Application Server V8.5IBM WebSphereIndia
 
MQ Guide France - IBM MQ and Containers
MQ Guide France - IBM MQ and ContainersMQ Guide France - IBM MQ and Containers
MQ Guide France - IBM MQ and ContainersRobert Parker
 

Tendances (20)

IBM MQ Online Tutorials
IBM MQ Online TutorialsIBM MQ Online Tutorials
IBM MQ Online Tutorials
 
IBM MQ - What's new in 9.2
IBM MQ - What's new in 9.2IBM MQ - What's new in 9.2
IBM MQ - What's new in 9.2
 
An Introduction to the Message Queuing Technology & IBM WebSphere MQ
An Introduction to the Message Queuing Technology & IBM WebSphere MQAn Introduction to the Message Queuing Technology & IBM WebSphere MQ
An Introduction to the Message Queuing Technology & IBM WebSphere MQ
 
Deploying and managing IBM MQ in the Cloud
Deploying and managing IBM MQ in the CloudDeploying and managing IBM MQ in the Cloud
Deploying and managing IBM MQ in the Cloud
 
Controlling access to your IBM MQ System
Controlling access to your IBM MQ SystemControlling access to your IBM MQ System
Controlling access to your IBM MQ System
 
Building an Active-Active IBM MQ System
Building an Active-Active IBM MQ SystemBuilding an Active-Active IBM MQ System
Building an Active-Active IBM MQ System
 
IBM MQ - High Availability and Disaster Recovery
IBM MQ - High Availability and Disaster RecoveryIBM MQ - High Availability and Disaster Recovery
IBM MQ - High Availability and Disaster Recovery
 
IBM Integration Bus & WebSphere MQ - High Availability & Disaster Recovery
IBM Integration Bus & WebSphere MQ - High Availability & Disaster RecoveryIBM Integration Bus & WebSphere MQ - High Availability & Disaster Recovery
IBM Integration Bus & WebSphere MQ - High Availability & Disaster Recovery
 
IBM WebSphere Application Server (Clustering) Concept
IBM WebSphere Application Server (Clustering) ConceptIBM WebSphere Application Server (Clustering) Concept
IBM WebSphere Application Server (Clustering) Concept
 
IBM Think 2018: IBM MQ High Availability
IBM Think 2018: IBM MQ High AvailabilityIBM Think 2018: IBM MQ High Availability
IBM Think 2018: IBM MQ High Availability
 
IBM MQ cloud architecture blueprint
IBM MQ cloud architecture blueprintIBM MQ cloud architecture blueprint
IBM MQ cloud architecture blueprint
 
IBM MQ: Managing Workloads, Scaling and Availability with MQ Clusters
IBM MQ: Managing Workloads, Scaling and Availability with MQ ClustersIBM MQ: Managing Workloads, Scaling and Availability with MQ Clusters
IBM MQ: Managing Workloads, Scaling and Availability with MQ Clusters
 
IBM MQ - better application performance
IBM MQ - better application performanceIBM MQ - better application performance
IBM MQ - better application performance
 
IBM WebSphere MQ: Managing Workloads, Scaling and Availability with MQ Clusters
IBM WebSphere MQ: Managing Workloads, Scaling and Availability with MQ ClustersIBM WebSphere MQ: Managing Workloads, Scaling and Availability with MQ Clusters
IBM WebSphere MQ: Managing Workloads, Scaling and Availability with MQ Clusters
 
Designing IBM MQ deployments for the cloud generation
Designing IBM MQ deployments for the cloud generationDesigning IBM MQ deployments for the cloud generation
Designing IBM MQ deployments for the cloud generation
 
New Tools and Interfaces for Managing IBM MQ
New Tools and Interfaces for Managing IBM MQNew Tools and Interfaces for Managing IBM MQ
New Tools and Interfaces for Managing IBM MQ
 
IBM Websphere concepts
IBM Websphere conceptsIBM Websphere concepts
IBM Websphere concepts
 
IBM MQ: An Introduction to Using and Developing with MQ Publish/Subscribe
IBM MQ: An Introduction to Using and Developing with MQ Publish/SubscribeIBM MQ: An Introduction to Using and Developing with MQ Publish/Subscribe
IBM MQ: An Introduction to Using and Developing with MQ Publish/Subscribe
 
Websphere Application Server V8.5
Websphere Application Server V8.5Websphere Application Server V8.5
Websphere Application Server V8.5
 
MQ Guide France - IBM MQ and Containers
MQ Guide France - IBM MQ and ContainersMQ Guide France - IBM MQ and Containers
MQ Guide France - IBM MQ and Containers
 

En vedette

websphere MQ training Online
websphere MQ training Onlinewebsphere MQ training Online
websphere MQ training OnlineDivya Angel
 
WebSphere Message Broker Application Development Training
WebSphere Message Broker Application Development TrainingWebSphere Message Broker Application Development Training
WebSphere Message Broker Application Development TrainingVijaya Raghava Vuligundam
 
GSM/UMTS network architecture tutorial (Indonesia)
GSM/UMTS network architecture tutorial (Indonesia)GSM/UMTS network architecture tutorial (Indonesia)
GSM/UMTS network architecture tutorial (Indonesia)ejlp12
 
WebSphere Message Broker Training | IBM WebSphere Message Broker Online Training
WebSphere Message Broker Training | IBM WebSphere Message Broker Online TrainingWebSphere Message Broker Training | IBM WebSphere Message Broker Online Training
WebSphere Message Broker Training | IBM WebSphere Message Broker Online Trainingecorptraining2
 
Linux container & docker
Linux container & dockerLinux container & docker
Linux container & dockerejlp12
 
Lab jam websphere message broker labs
Lab jam   websphere message broker labsLab jam   websphere message broker labs
Lab jam websphere message broker labsEng Binary
 
RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuseejlp12
 
Introduction to WebSphere Message Broker
Introduction to WebSphere Message BrokerIntroduction to WebSphere Message Broker
Introduction to WebSphere Message BrokerAnt Phillips
 
PMP Training - 06 project time management2
PMP Training - 06 project time management2PMP Training - 06 project time management2
PMP Training - 06 project time management2ejlp12
 
SHARE2016: DevOps - IIB Administration for Continuous Delivery and DevOps
SHARE2016:  DevOps - IIB Administration for Continuous Delivery and DevOpsSHARE2016:  DevOps - IIB Administration for Continuous Delivery and DevOps
SHARE2016: DevOps - IIB Administration for Continuous Delivery and DevOpsRob Convery
 
IAS for IBM WebSphere MQ Users
IAS for IBM WebSphere MQ UsersIAS for IBM WebSphere MQ Users
IAS for IBM WebSphere MQ UsersInvenire Aude
 
Architecting and Tuning IIB/eXtreme Scale for Maximum Performance and Reliabi...
Architecting and Tuning IIB/eXtreme Scale for Maximum Performance and Reliabi...Architecting and Tuning IIB/eXtreme Scale for Maximum Performance and Reliabi...
Architecting and Tuning IIB/eXtreme Scale for Maximum Performance and Reliabi...Prolifics
 
IBM MobileFirst Platform 고객사례집
IBM MobileFirst Platform 고객사례집IBM MobileFirst Platform 고객사례집
IBM MobileFirst Platform 고객사례집kimhsam
 
Examkiller 000-m39 exam
Examkiller 000-m39 examExamkiller 000-m39 exam
Examkiller 000-m39 examjimenoon
 

En vedette (20)

IBM MQ V9 Overview
IBM MQ V9 OverviewIBM MQ V9 Overview
IBM MQ V9 Overview
 
websphere MQ training Online
websphere MQ training Onlinewebsphere MQ training Online
websphere MQ training Online
 
WebSphere Message Broker Application Development Training
WebSphere Message Broker Application Development TrainingWebSphere Message Broker Application Development Training
WebSphere Message Broker Application Development Training
 
WebSphere Message Broker installation guide
WebSphere Message Broker installation guideWebSphere Message Broker installation guide
WebSphere Message Broker installation guide
 
WebSphere Message Broker Training Agenda
WebSphere Message Broker Training AgendaWebSphere Message Broker Training Agenda
WebSphere Message Broker Training Agenda
 
WebSphere MQ introduction
WebSphere MQ introductionWebSphere MQ introduction
WebSphere MQ introduction
 
GSM/UMTS network architecture tutorial (Indonesia)
GSM/UMTS network architecture tutorial (Indonesia)GSM/UMTS network architecture tutorial (Indonesia)
GSM/UMTS network architecture tutorial (Indonesia)
 
WebSphere Message Broker Training | IBM WebSphere Message Broker Online Training
WebSphere Message Broker Training | IBM WebSphere Message Broker Online TrainingWebSphere Message Broker Training | IBM WebSphere Message Broker Online Training
WebSphere Message Broker Training | IBM WebSphere Message Broker Online Training
 
Linux container & docker
Linux container & dockerLinux container & docker
Linux container & docker
 
Lab jam websphere message broker labs
Lab jam   websphere message broker labsLab jam   websphere message broker labs
Lab jam websphere message broker labs
 
RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuse
 
Introduction to WebSphere Message Broker
Introduction to WebSphere Message BrokerIntroduction to WebSphere Message Broker
Introduction to WebSphere Message Broker
 
PMP Training - 06 project time management2
PMP Training - 06 project time management2PMP Training - 06 project time management2
PMP Training - 06 project time management2
 
SHARE2016: DevOps - IIB Administration for Continuous Delivery and DevOps
SHARE2016:  DevOps - IIB Administration for Continuous Delivery and DevOpsSHARE2016:  DevOps - IIB Administration for Continuous Delivery and DevOps
SHARE2016: DevOps - IIB Administration for Continuous Delivery and DevOps
 
Ibm message broker basic
Ibm message broker basicIbm message broker basic
Ibm message broker basic
 
IAS for IBM WebSphere MQ Users
IAS for IBM WebSphere MQ UsersIAS for IBM WebSphere MQ Users
IAS for IBM WebSphere MQ Users
 
Architecting and Tuning IIB/eXtreme Scale for Maximum Performance and Reliabi...
Architecting and Tuning IIB/eXtreme Scale for Maximum Performance and Reliabi...Architecting and Tuning IIB/eXtreme Scale for Maximum Performance and Reliabi...
Architecting and Tuning IIB/eXtreme Scale for Maximum Performance and Reliabi...
 
How to use SFTP
How to use SFTPHow to use SFTP
How to use SFTP
 
IBM MobileFirst Platform 고객사례집
IBM MobileFirst Platform 고객사례집IBM MobileFirst Platform 고객사례집
IBM MobileFirst Platform 고객사례집
 
Examkiller 000-m39 exam
Examkiller 000-m39 examExamkiller 000-m39 exam
Examkiller 000-m39 exam
 

Similaire à IBM WebSphere MQ Introduction

IBM MQ Advanced - IBM InterConnect 2016
IBM MQ Advanced - IBM InterConnect 2016IBM MQ Advanced - IBM InterConnect 2016
IBM MQ Advanced - IBM InterConnect 2016Leif Davidsen
 
Message Queuing (MSMQ)
Message Queuing (MSMQ)Message Queuing (MSMQ)
Message Queuing (MSMQ)Senior Dev
 
Connecting IBM MessageSight to the Enterprise
Connecting IBM MessageSight to the EnterpriseConnecting IBM MessageSight to the Enterprise
Connecting IBM MessageSight to the EnterpriseAndrew Schofield
 
What's New in IBM MQ - Version 8
What's New in IBM MQ - Version 8What's New in IBM MQ - Version 8
What's New in IBM MQ - Version 8MarkTaylorIBM
 
Mule enterprise service introduction
Mule enterprise service introductionMule enterprise service introduction
Mule enterprise service introductionSon Nguyen
 
Realtime mobile&iot solutions using mqtt and message sight
Realtime mobile&iot solutions using mqtt and message sightRealtime mobile&iot solutions using mqtt and message sight
Realtime mobile&iot solutions using mqtt and message sightfloridawusergroup
 
Secure Your Messages with IBM MQ Advanced Message Security
Secure Your Messages with IBM MQ Advanced Message SecuritySecure Your Messages with IBM MQ Advanced Message Security
Secure Your Messages with IBM MQ Advanced Message SecurityMorag Hughson
 
Secure Messages with IBM WebSphere MQ Advanced Message Security
Secure Messages with IBM WebSphere MQ Advanced Message SecuritySecure Messages with IBM WebSphere MQ Advanced Message Security
Secure Messages with IBM WebSphere MQ Advanced Message SecurityMorag Hughson
 
MQ Support for z/OS Connect
MQ Support for z/OS ConnectMQ Support for z/OS Connect
MQ Support for z/OS ConnectMatt Leming
 
1480-techintrotoiib-150224130001-conversion-gate01.pptx
1480-techintrotoiib-150224130001-conversion-gate01.pptx1480-techintrotoiib-150224130001-conversion-gate01.pptx
1480-techintrotoiib-150224130001-conversion-gate01.pptxBalakoteswaraReddyM
 
What's new in IBM MQ Messaging
What's new in IBM MQ MessagingWhat's new in IBM MQ Messaging
What's new in IBM MQ MessagingMarkTaylorIBM
 
InterConnect 2016: What's new in IBM MQ
InterConnect 2016: What's new in IBM MQInterConnect 2016: What's new in IBM MQ
InterConnect 2016: What's new in IBM MQDavid Ware
 
What's New In MQ 9.2 on z/OS
What's New In MQ 9.2 on z/OSWhat's New In MQ 9.2 on z/OS
What's New In MQ 9.2 on z/OSMatt Leming
 

Similaire à IBM WebSphere MQ Introduction (20)

IBM MQ Advanced - IBM InterConnect 2016
IBM MQ Advanced - IBM InterConnect 2016IBM MQ Advanced - IBM InterConnect 2016
IBM MQ Advanced - IBM InterConnect 2016
 
Message Queuing (MSMQ)
Message Queuing (MSMQ)Message Queuing (MSMQ)
Message Queuing (MSMQ)
 
Connecting IBM MessageSight to the Enterprise
Connecting IBM MessageSight to the EnterpriseConnecting IBM MessageSight to the Enterprise
Connecting IBM MessageSight to the Enterprise
 
What's New in IBM MQ - Version 8
What's New in IBM MQ - Version 8What's New in IBM MQ - Version 8
What's New in IBM MQ - Version 8
 
Mule
MuleMule
Mule
 
Mule enterprise service introduction
Mule enterprise service introductionMule enterprise service introduction
Mule enterprise service introduction
 
Mule esb
Mule esbMule esb
Mule esb
 
Mule esb
Mule esbMule esb
Mule esb
 
Realtime mobile&iot solutions using mqtt and message sight
Realtime mobile&iot solutions using mqtt and message sightRealtime mobile&iot solutions using mqtt and message sight
Realtime mobile&iot solutions using mqtt and message sight
 
IBM MQ V8 annd JMS 2.0
IBM MQ V8 annd JMS 2.0IBM MQ V8 annd JMS 2.0
IBM MQ V8 annd JMS 2.0
 
Secure Your Messages with IBM MQ Advanced Message Security
Secure Your Messages with IBM MQ Advanced Message SecuritySecure Your Messages with IBM MQ Advanced Message Security
Secure Your Messages with IBM MQ Advanced Message Security
 
Secure Messages with IBM WebSphere MQ Advanced Message Security
Secure Messages with IBM WebSphere MQ Advanced Message SecuritySecure Messages with IBM WebSphere MQ Advanced Message Security
Secure Messages with IBM WebSphere MQ Advanced Message Security
 
Ibm mq appliance slideshare
Ibm mq appliance slideshareIbm mq appliance slideshare
Ibm mq appliance slideshare
 
MQ Support for z/OS Connect
MQ Support for z/OS ConnectMQ Support for z/OS Connect
MQ Support for z/OS Connect
 
1480-techintrotoiib-150224130001-conversion-gate01.pptx
1480-techintrotoiib-150224130001-conversion-gate01.pptx1480-techintrotoiib-150224130001-conversion-gate01.pptx
1480-techintrotoiib-150224130001-conversion-gate01.pptx
 
What's new in IBM MQ Messaging
What's new in IBM MQ MessagingWhat's new in IBM MQ Messaging
What's new in IBM MQ Messaging
 
IBM MQ Series For ZOS
IBM MQ Series For ZOSIBM MQ Series For ZOS
IBM MQ Series For ZOS
 
InterConnect 2016: What's new in IBM MQ
InterConnect 2016: What's new in IBM MQInterConnect 2016: What's new in IBM MQ
InterConnect 2016: What's new in IBM MQ
 
What's New In MQ 9.2 on z/OS
What's New In MQ 9.2 on z/OSWhat's New In MQ 9.2 on z/OS
What's New In MQ 9.2 on z/OS
 
Ead pertemuan-7
Ead pertemuan-7Ead pertemuan-7
Ead pertemuan-7
 

Plus de ejlp12

Introduction to Docker storage, volume and image
Introduction to Docker storage, volume and imageIntroduction to Docker storage, volume and image
Introduction to Docker storage, volume and imageejlp12
 
Java troubleshooting thread dump
Java troubleshooting thread dumpJava troubleshooting thread dump
Java troubleshooting thread dumpejlp12
 
WebSphere Application Server Information Resources
WebSphere Application Server Information ResourcesWebSphere Application Server Information Resources
WebSphere Application Server Information Resourcesejlp12
 
WebSphere Application Server Family (Editions Comparison)
WebSphere Application Server Family (Editions Comparison)WebSphere Application Server Family (Editions Comparison)
WebSphere Application Server Family (Editions Comparison)ejlp12
 
BPEL, BPEL vs ESB (Integration)
BPEL, BPEL vs ESB (Integration)BPEL, BPEL vs ESB (Integration)
BPEL, BPEL vs ESB (Integration)ejlp12
 
BPMN Introduction
BPMN IntroductionBPMN Introduction
BPMN Introductionejlp12
 
JBoss Data Virtualization (JDV) Sample Physical Deployment Architecture
JBoss Data Virtualization (JDV) Sample Physical Deployment ArchitectureJBoss Data Virtualization (JDV) Sample Physical Deployment Architecture
JBoss Data Virtualization (JDV) Sample Physical Deployment Architectureejlp12
 
WebSphere Application Server Topology Options
WebSphere Application Server Topology OptionsWebSphere Application Server Topology Options
WebSphere Application Server Topology Optionsejlp12
 
IBM WebSphere Application Server version to version comparison
IBM WebSphere Application Server version to version comparisonIBM WebSphere Application Server version to version comparison
IBM WebSphere Application Server version to version comparisonejlp12
 
Java EE Introduction
Java EE IntroductionJava EE Introduction
Java EE Introductionejlp12
 
Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)ejlp12
 
Introduction to jQuery Mobile
Introduction to jQuery MobileIntroduction to jQuery Mobile
Introduction to jQuery Mobileejlp12
 
Introduction to JPA (JPA version 2.0)
Introduction to JPA (JPA version 2.0)Introduction to JPA (JPA version 2.0)
Introduction to JPA (JPA version 2.0)ejlp12
 
Introduction to JavaBeans Activation Framework v1.1
Introduction to JavaBeans Activation Framework v1.1Introduction to JavaBeans Activation Framework v1.1
Introduction to JavaBeans Activation Framework v1.1ejlp12
 
Arah pengembangan core network architecture (Indonesia)
Arah pengembangan core network architecture (Indonesia)Arah pengembangan core network architecture (Indonesia)
Arah pengembangan core network architecture (Indonesia)ejlp12
 
Agile & SCRUM
Agile & SCRUMAgile & SCRUM
Agile & SCRUMejlp12
 
PMP Training - 11 project risk management
PMP Training - 11 project risk managementPMP Training - 11 project risk management
PMP Training - 11 project risk managementejlp12
 
PMP Training - 10 project communication management
PMP Training - 10 project communication managementPMP Training - 10 project communication management
PMP Training - 10 project communication managementejlp12
 
PMP Training - 09 project human resource management
PMP Training - 09 project human resource managementPMP Training - 09 project human resource management
PMP Training - 09 project human resource managementejlp12
 
PMP Training - 08 project quality management
PMP Training - 08 project quality managementPMP Training - 08 project quality management
PMP Training - 08 project quality managementejlp12
 

Plus de ejlp12 (20)

Introduction to Docker storage, volume and image
Introduction to Docker storage, volume and imageIntroduction to Docker storage, volume and image
Introduction to Docker storage, volume and image
 
Java troubleshooting thread dump
Java troubleshooting thread dumpJava troubleshooting thread dump
Java troubleshooting thread dump
 
WebSphere Application Server Information Resources
WebSphere Application Server Information ResourcesWebSphere Application Server Information Resources
WebSphere Application Server Information Resources
 
WebSphere Application Server Family (Editions Comparison)
WebSphere Application Server Family (Editions Comparison)WebSphere Application Server Family (Editions Comparison)
WebSphere Application Server Family (Editions Comparison)
 
BPEL, BPEL vs ESB (Integration)
BPEL, BPEL vs ESB (Integration)BPEL, BPEL vs ESB (Integration)
BPEL, BPEL vs ESB (Integration)
 
BPMN Introduction
BPMN IntroductionBPMN Introduction
BPMN Introduction
 
JBoss Data Virtualization (JDV) Sample Physical Deployment Architecture
JBoss Data Virtualization (JDV) Sample Physical Deployment ArchitectureJBoss Data Virtualization (JDV) Sample Physical Deployment Architecture
JBoss Data Virtualization (JDV) Sample Physical Deployment Architecture
 
WebSphere Application Server Topology Options
WebSphere Application Server Topology OptionsWebSphere Application Server Topology Options
WebSphere Application Server Topology Options
 
IBM WebSphere Application Server version to version comparison
IBM WebSphere Application Server version to version comparisonIBM WebSphere Application Server version to version comparison
IBM WebSphere Application Server version to version comparison
 
Java EE Introduction
Java EE IntroductionJava EE Introduction
Java EE Introduction
 
Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)
 
Introduction to jQuery Mobile
Introduction to jQuery MobileIntroduction to jQuery Mobile
Introduction to jQuery Mobile
 
Introduction to JPA (JPA version 2.0)
Introduction to JPA (JPA version 2.0)Introduction to JPA (JPA version 2.0)
Introduction to JPA (JPA version 2.0)
 
Introduction to JavaBeans Activation Framework v1.1
Introduction to JavaBeans Activation Framework v1.1Introduction to JavaBeans Activation Framework v1.1
Introduction to JavaBeans Activation Framework v1.1
 
Arah pengembangan core network architecture (Indonesia)
Arah pengembangan core network architecture (Indonesia)Arah pengembangan core network architecture (Indonesia)
Arah pengembangan core network architecture (Indonesia)
 
Agile & SCRUM
Agile & SCRUMAgile & SCRUM
Agile & SCRUM
 
PMP Training - 11 project risk management
PMP Training - 11 project risk managementPMP Training - 11 project risk management
PMP Training - 11 project risk management
 
PMP Training - 10 project communication management
PMP Training - 10 project communication managementPMP Training - 10 project communication management
PMP Training - 10 project communication management
 
PMP Training - 09 project human resource management
PMP Training - 09 project human resource managementPMP Training - 09 project human resource management
PMP Training - 09 project human resource management
 
PMP Training - 08 project quality management
PMP Training - 08 project quality managementPMP Training - 08 project quality management
PMP Training - 08 project quality management
 

Dernier

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 

Dernier (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

IBM WebSphere MQ Introduction

  • 1. © 2013 IBM Corporation WebSphere WebSphere MQ v7.5 Enablement Training
  • 2. © 2010 IBM Corporation WebSphere MQ in a nutshell
  • 3. © 2010 IBM Corporation What is Websphere MQ  Software that enables programs to communicate across a network using a simple and consistent application programming interface.  A messaging and queuing middleware, with publish/subscribe Messaging: programs communicate by sending each other data in messages rather than by calling each other directly. Queuing: the messages are placed on queues in storage, so that programs can run independently of each other, at different speeds and times, in different locations, and without having a logical connection between them. Publish/subscribe: a program can send (publish) data to a single destination, and let WebSphere MQ deal with the distribution of that data to other programs (subscribers). The publisher defines a topic for the information, and the subscriber specifies what topics it wants to receive.
  • 4. © 2010 IBM Corporation What it can do for me?  Sends and receives data between your applications, and over networks.  Message delivery is assured and decoupled from the application.  Your application programmers do not need to have communications programming knowledge.
  • 5. © 2010 IBM Corporation How do I use it  Use its associated tools to create your initial configuration. – WebSphere MQ Explorer workbench – WebSphere MQ Script commands (MQSC) – Programmable Command Format (PCF)  Use the MQ API (MQI) in your application to connect to a queue manager, open queues and topics, and put and get messages.
  • 6. © 2010 IBM Corporation 6 MQ Client MQ Server How does WebSphere MQ work?  Messaging services are based on Queues that store and forward data based on simple programming commands  Uses the proven database technique of two- phase commit transactions to ensure messages are not lost or duplicated  Uses publish/subscribe to route messages dynamically based on keywords or “topics”  Uses multi-processor threading and clustering to accelerate throughput of messages Message Queue Application ZApplication A
  • 7. © 2010 IBM Corporation INSTALLING WebSphere MQ
  • 8. © 2010 IBM Corporation Installation  Read the documentation/manual – Main resource: IBM WMQ Infocenter – Take a look at the specific target platform chapter  Know what you are going to install (server or client?)  Find out the system requirement  Prepare your installation – Write your non-functional requirement – Design and draw the topology (architecture) – Design and document the configuration  Verify the installation – Test
  • 9. © 2010 IBM Corporation Preparation of WMQ Server Installation  Separate the volume for product code & working data or even more – Product code: /opt/mqm or C:Program FilesIBMWebSphere MQ – Working data: /var/mqm or anywhere – Recovery log data: /var/mqm/log – Error files: error files (/var/mqm/errors)  Prepare/check the disk space for product code & working data – Product data min ~350MB (Linux/Unix) – Working data disk size consideration: • The maximum number of messages in the system at one time • Contingency for message buildups, if there is a system problem • The average size of the message data, plus 500 bytes for the message header • The number of queues • The size of log files and error messages – Log data disk size calculation
  • 10. © 2010 IBM Corporation Software components (Linux) Linux/Windows only
  • 11. © 2010 IBM Corporation WebSphere MQ Server Installation  Linux – ./mqlicense.sh –accept – rpm -ivh MQSeriesRuntime-7.0.1-0.i386.rpm MQSeriesServer-7.0.1-0.i386.rpm  AIX – installp -axgXYd. All  Solaris – ./mqlicense.sh -text-only – pkgadd -d.  HP-UX – ./mqlicense.sh –accept – swinstall -s $PWD/hp-Uxxxxx.v11 MQSERIES  Windows – Run Setup.exe
  • 12. © 2010 IBM Corporation IBM GSKit  IBM WebSphere Eclipse Platform  IBM Global Security Kit (GSKit)  Subcomponent that provides support for SSL and TLS for Windows, Linux/Unix
  • 13. © 2010 IBM Corporation User ID WebSphere MQ utilize user authentication of the system operation. Prerequisite for installation (Linux/Unix): user ID: mqm, with a primary group of mqm To configure multi-instance queue managers, use the same UID & GID To run administration commands e.g. crtmqm, you need to be a member of mqm group
  • 14. © 2010 IBM Corporation LAB 1: Install WebSphere MQ  In the First Lab you will: – Find WebSphere MQ system requirements information – Find WebSphere MQ documentation (Information center) – Read installation requirements – Download & Install offline WMQ infocenter – Download WMQ Trial – Install WMQ in Windows – Loking around at WebSphere MQ installation directory – View mqs.ini file
  • 15. © 2010 IBM Corporation MQ Installation Directory  Sample mqs.ini file
  • 16. © 2010 IBM Corporation WebSphere MQ
  • 17. © 2010 IBM Corporation Message  A collection of data sent by one program and intended for another program  A message is built by an application  A message is consumed by a different application  Message can contain any kind of data  Type of message:  Type of message is identified by an MQMT_* value  We can also define our own types of message • Datagram A simple message for which no reply is expected • Request A message for which a reply is expected • Reply A reply to a request message • Report A message that describes an event such as the occurrence of an error
  • 18. © 2010 IBM Corporation Message Composition  WMQ message are made up of two parts:  Both are supplied by the sending application  Some fields in the message descriptor are set by the queue manager on behalf of the application Message properties Application data
  • 19. © 2010 IBM Corporation The structure of an MQ Message Message Headers  A Set of Message Attributes understood and augmented by the Queue Manager –Unique Message Id –Correlation Id –Routing Information –Reply Routing Information –Message Priority –Message Persistence •Persistent •Non-persistent –Message Codepage –Message Format –Etc… Message Data  Any sequence of bytes –Defined by the sending program –Understood by the receiving program –NOT meaningful to the Queue Manager  Can contain any data –Structured • XML, Tagged, Tagged Delimited, C or Cobol defined, etc. –Unstructured • Binary A video, a picture, etc. • Any content Message Headers Message DataMessage Properties Message Properties • Arbitrary values associated with the message but not part of the body • Properties can be integers, strings, boolean, etc. • Receiving apps do not see them unless they want • Permits explicit statement of relationships between messages • e.g. Message X is a REPLY to Message Y
  • 20. © 2010 IBM Corporation Some fields in the message descriptor Message descriptor fields Publication/subscription message descriptor fields • SubName • SubUserData • SubCorrelId • PubPriority • PubAccountingToken • PubAppIdentityData SubLevel • ResObjString
  • 21. © 2010 IBM Corporation Message Properties  Can be used to include business data or state information without having to store it in the application data  Used by message selectors – to filter publications to topics – to selectively get messages from queues  Queue manager has MaxPropertiesLength to control the size of the properties  Property name is a case-sensitive character string, limited to +4095 characters  Property data type: – boolean – byte string – character string – floating-point – integer number  Accessible by JMS as JMS message properties if prefixed by “usr.” – message.getStringProperty('myproperty')
  • 22. © 2010 IBM Corporation Message Length & Segmentation  The length of data ≤ MaxMsgLength attribute of both the queue and queue manager  The default maximum message length is 4 MB but can be changed up to max 100 MB  Message segmentation – message is too large to be handled by queue or queue manager
  • 23. © 2010 IBM Corporation 23 Message persistence Queue Manager Queue CC/R C Queue Application Program MQPU T MQPU T Queue Files Non- Persistent message Persistent message  The persistence of a message is determined by the value of the Persistence field in its message descriptor.  Both persistent and non-persistent messages can be stored on the same queue.  Persistence is accomplished via message logging  Persistent Messages are always recoverable  Non-persistent Messages have 2 classes of service: Messages are retained for the life of the Queue Manager Messages can survive a normal shutdown and restart of the Queue Manager  Logging has implication on performanceLogs CC/R C
  • 24. © 2010 IBM Corporation Message Priority  Priority field of the MQMD structure can be set  MsgDeliverySequence attribute of the queue determines whether – stored in FIFO (first in, first out) sequence – in FIFO within priority sequence  DefPriority attribute of a queue sets the default priority value  MaxPriority attribute of the queue manager is the maximum priority we can assign
  • 25. © 2010 IBM Corporation Application Data Conversion  Application data of a message can be converted at the sending queue manager, or at the receiving queue manager  Messages with MQFMT_NONE specified are not converted
  • 26. © 2010 IBM Corporation MESSAGE QUEUING
  • 27. © 2010 IBM Corporation 27 What is a Queue ?  Messages are delivered asynchronously to a Queue  A Place to hold messages  Queue creation – Pre-defined – Dynamic definition  Message Access – FIFO (first in first out) – Priority (FIFO within Priority) – Direct – Destructive & non-destructive access  Parallel access by applications – Managed by the queue manager
  • 28. © 2010 IBM Corporation Message Queuing – Main Features  There are no direct connections between programs (decoupled)  Communication between programs can be time-independent.  Work can be carried out by small, self-contained programs.  Communication can be driven by events.  Applications can assign a priority to a message.  Security.  Data integrity.  Recovery support.
  • 29. © 2010 IBM Corporation Queues can be Local or Remote MQ I System 1 System 2 Messagin g and Queuing Messagin g and Queuing TCP/IP is primary protocol Q1 Q2 Put Q2 Put Q1 Get Q1 Get Q2 XmitQ MQ I Get Q2 Program A Program B Program C Sender Channel Receiver Channel
  • 30. © 2010 IBM Corporation30 Queue The types of queue that WebSphere MQ supports for applications to use are
  • 31. © 2010 IBM Corporation Queue definition and independence
  • 32. © 2010 IBM Corporation32 WebSphere MQ – Queue  Alias Queue – Is not real queues but definitions. – Used to assign different names to the same physical queue. – The other queue can be: • A local queue • A local definition of a remote queue • A topic.  Cluster Queue – A local queue that is known throughout a cluster of queue managers, that is, any queue manager that belongs to the cluster can send messages to it without the need of a remote definition or defining channels to the queue manager that owns it.  Remote Queue – is a definition (not a real queue), owned by a different queue manager. – A remote queue definition is the local definition of a remote queue. – Application can access a remote queue just as use the name of a local queue. – A program cannot read messages from a remote queue.
  • 33. © 2010 IBM Corporation33 WebSphere MQ – Queue  Model/Dynamic Queue – Such a queue is defined "on the fly" when the application needs it. – Retained by the queue manager or automatically deleted when the application program ends. – Dynamic queues are local queues. – They are often used in conversational applications, to store intermediate results. – Dynamic queues can be: Temporary queues that do not survive when queue manager restarts Permanent queues that do survive when queue manager restarts  Local Queue – A queue is local if it is owned by the queue manager to which the application program is connected. – For example, program A and program B each has a queue for incoming messages and another queue for outgoing messages. Since the queue manager serves both programs, all four queues are local.
  • 34. © 2010 IBM Corporation34 WebSphere MQ – Queue  Transmission Queue – A remote queue is associated with a transmission queue. – Transmission queues are used as an intermediate step when sending messages to queues that are owned by a different queue manager. – Typically, there is only one transmission queue for each remote queue manager (or machine). – Transmission queues are transparent to the application. They are used internally by the queue manager – All messages written to queues owned by a remote queue manager are actually written to the transmission queue for this remote queue manager. – The messages will then be read from the transmission queue and sent to the remote queue manager using MQ Series clusters – There is only one transmission queue for all messages sent to all other queue managers in the cluster.
  • 35. © 2010 IBM Corporation35 WebSphere MQ – Queue  Initiation Queue – A local queue to which the queue manager writes a trigger message when certain conditions are met on another local queue – Example: • when a message is put into an empty message queue or in a transmission queue, a trigger message is written to the corresponding initiation Queue. Such a trigger message is transparent to the programmer. – Two of MQ applications monitor initiation queues and read trigger messages • The trigger monitor which starts applications • The channel initiator which starts the transmission between queue managers. – Applications do not need to be aware of initiation queues. See Triggering topic
  • 36. © 2010 IBM Corporation36 WebSphere MQ – Queue  Dead-letter Queue – A queue manager must be able to handle situations when it cannot deliver a message. Examples: • The destination queue is full. • The destination queue does not exist. • Message puts have been inhibited on the destination queue. • The sender is not authorized to use the destination queue. • The message is too large. – Used as a repository for all messages that cannot be delivered. – Defined when the queue manager is created. – Messages can be put on the DLQ by • queue managers • message channel agents (MCAs) • Applications • All messages must be prefixed with a dead-letter header structure, MQDLH • The Reason field of the MQDLH structure contains a reason code that identifies why the message is on the DLQ
  • 37. © 2010 IBM Corporation LOG PUT GET Messaging & Queuing Operating System & Storage Communications Utilities Listener Command Server Trigger monitor Channel Initiator Windows Explorer Applications Operating System • Timers • Semaphores • ECBs • Memory • … What is a Queue Manager?
  • 38. © 2010 IBM Corporation 38 Elements of Messaging and Queuing  Programs communicate by putting messages in message queues “A building block for distributed processing”
  • 39. © 2010 IBM Corporation 39 Elements of Messaging and Queuing Communication can be one way or two way
  • 40. © 2010 IBM Corporation 40 Elements of Messaging and Queuing Either program can be busy or unavailable
  • 41. © 2010 IBM Corporation 41 Elements of Messaging and Queuing One to many . . .
  • 42. © 2010 IBM Corporation 42 Elements of Messaging and Queuing Or many to one . . .
  • 43. © 2010 IBM Corporation Triggering  Triggering start when the right conditions are detected by the queue manager  A trigger message send to a queue called an initiation queue
  • 44. © 2010 IBM Corporation Trigger  Tigger is internally used for starting the channel to transfer the message
  • 45. © 2010 IBM Corporation LAB 2A: Verifying Installation  In this Lab you will verifying the MQ Server installation by – Using command line to check installed WebSphere MQ version – Using command line to create a Queue Manager and starting it – Using MQSC to create a queue – Using sample program to put text message into the queue (amqsput) – Using sample program to get text message from the queue (amqsget) MQ_INSTALLATION_PATHbinsetmqenv –s dspmqver crtmqm QMA strmqm QMA runmqsc QMA DEFINE QLOCAL (QUEUE1) end amqsput QUEUE1 amqsget QUEUE1
  • 46. © 2010 IBM Corporation LAB 2B: Verifying Server-to-Server Installation  In this Lab you will verifying the MQ Server to MQ Server installation & communication by – Using command line to create a Queue Manager and starting it – Using MQSC to create local queue, remote queue, create & start listener, create channel – Using sample program to put text message into the queue (amqsput) – Using sample program to get text message from the queue (amqsget)
  • 47. © 2010 IBM Corporation LAB 3: Exploring WMQ Explorer Administration Using the WebSphere MQ Explorer  In this Lab you will: – Create a Queue Manager – Work with Queues (create, test, browse, delete) – Create a Queue Manager Group (or Set) – Administer a Group of Queue Managers Collectively – Use Filters MQ Explorer is included with an MQ server installation and is also available for download as SupportPac MS0T. Since MQ Explorer V7.1 it can be installed as an Eclipse Plug-in via Eclipse Marketplace
  • 48. © 2010 IBM Corporation INTERCOMMUNICATION
  • 49. © 2010 IBM Corporation Intercommunication • Sending messages from one queue manager to another • Could be on the same machine or another • Could be running on the same platform at local or different platform (distributed environment) • Systems Network Architecture Advanced Program-to Program Communication (SNA APPC) • TCP/IP • Network Basic Input/Output System (NetBIOS) • Sequenced Packet Exchange (SPX)
  • 50. © 2010 IBM Corporation Components handles intercommunication  Queue Manager has a definition of • Its queue • Remote queue definitions  Transmission queue – a special type of local queue on which messages are stored until they can be successfully transmitted and stored at the remote queue manager – the messages are destined for a remote queue manager is stored in here first – one transmission queue need to be defined for each sending MCA unless we use cluster  Message Channel Agent (MCA) – handles the sending and receiving of messages – takes messages from the transmission queue and puts them on the communication link – receives messages and delivers them onto a queue  Channel – a one-way communication link between two queue managers – carry messages destined for any number of queues at the remote queue manager  Listener – processes that accept network requests
  • 51. © 2010 IBM Corporation What is Channel?  Queue Manager to Queue Manager (Message channel) – Uni-directional – Usually defined in pairs for example: • One Sender • One Receiver – Asynchronous  Client to Queue Manager (MQI channel) – Bi-directional – Defined as a single channel – Synchronous  A building block for a reliable Enterprise Service Bus (ESB) * Note: Client to Client communication must go via a Queue Manager
  • 52. © 2010 IBM Corporation Components needed to send a message  A simple channel consist of – a sender channel definition at the local queue manager – a receiver channel definition at the remote queue manager  These two definitions must have the same name  Dead-letter queue (undelivered message queue) – if messages cannot be delivered to their destination, they are put on this queue – Each queue manager should have this queue
  • 53. © 2010 IBM Corporation Components needed to return a message  To run in the opposite direction between the queue managers, you need to define another channel
  • 54. © 2010 IBM Corporation Message Channels  Uni-directional QM to QM  Types of end point of a message channel 1. Sender 2. Receiver 3. Server 4. Requester 5. Cluster sender 6. Cluster receiver  Combination of connecting two end points of message channels 1. Sender-receiver 2. Requester-server 3. Requester-sender (callback) 4. Server-receiver 5. Cluster sender-cluster receiver 1 & 4 2 3 5
  • 55. © 2010 IBM Corporation Channel Initiator & Listener  A channel initiator acts as a trigger monitor for sender channels.  Implementation channel initiators & listeners is platform specific (read the doc).  The default behavior is to start a channel initiator when a queue manager is automatically started. This can be changed by setting SCHINIT attribute of the queue manager to MANUAL
  • 56. © 2010 IBM Corporation Cluster An alternative to the traditional WebSphere MQ network  A network of queue managers that are logically associated in some way  Queues in a queue manager is available to every other queue manager in the cluster  Any queue manager can send a message to any other queue manager in the same cluster without the need for explicit channel definitions, remote-queue definitions, or transmission queues for each destination Every queue manager in a cluster:  has a single transmission queue  needs to define only one cluster-receiver channel and one cluster-sender channel
  • 57. © 2010 IBM Corporation Channel-exit programs  To do some additional processing  Types of channel exit: 1. Security exit 2. Message exit 3. Send and receive exits 4. Message-retry exit 5. Channel auto-definition exit
  • 58. © 2010 IBM Corporation Dead-letters Queues (DLQ)  Used if they cannot be routed to their correct destination.  If no DLQ and message is left on the transmission queue or discarded (non-persistent) and the channel is stopped.  It can affect the sequence in which messages are delivered.  Used if data-conversion errors occurs at the sending end of a channel
  • 59. © 2010 IBM Corporation How to get to the remote queue manager  Multi-hopping – to pass through one or more intermediate queue managers on the way to the target queue manager  Sharing channel – messages from multiple applications to multiple remote queues can use the same channel  Using different channels – Define another channel and another transmission queue and create a remote queue definition specifying the location and the transmission queue name  Using clustering – Queue managers in a cluster can make the queues that they host available to every other queue manager in the cluster.
  • 60. © 2010 IBM Corporation Multi-hopping  Using other MQ server(s) in the middle
  • 61. © 2010 IBM Corporation Sharing channels  Using same channels for the multiple remote queues
  • 62. © 2010 IBM Corporation Using different channels  The use of channels is transparent to the application Using remote queue definition, your applications must not specify the location (that is, the destination queue manager) themselves
  • 63. © 2010 IBM Corporation Using Clustering  Send to any other queue manager
  • 64. © 2010 IBM Corporation Dead-letter queue handler  A routine to process messages on the DLQ regularly  Invoke using the runmqdlq command  Instructions for processing messages is using a user-written rules table runmqdlq DLQ QMGR1 < qrule.rul
  • 65. © 2010 IBM Corporation What happens when a message cannot be delivered?  MCA can process it in several ways: – try again Channel have following parameter to retry . • Message retry count (MRRTY) * Message retry interval (MRTMR) – return-to-sender, – put it on the dead-letter queue.
  • 66. © 2010 IBM Corporation LAB4: Explore distributed queuing 1. Create Queue Manager QM1 2. Create Local Queue Q1 3. Create Receiver Channel QM2.TO.QM1 4. Create Queue Manager QM2 5. Create Transmission Queue QM2.TO.QM1 6. Create Sender Channel QM2.TO.QM1 (the name should be the same as receiver channel in QM1) and specify the transmission queue name as you created earlier 7. Create Remote Queue Q2, specify the remote queue manager to QM1 and transmission queue as you created earlier QM2 Q2 QM2.TO.QM 1 Message Channel Agent QM1 Q2 Message Channel Agent QM2.TO.QM 1 Remote Queue Defiition Transmition Queue Sender Channel Receiver Channel Local Queue Connect queue managers using Sender-receiver channel pair
  • 67. © 2010 IBM Corporation WebSPHERE MQ ADMINISTRATION
  • 68. © 2010 IBM Corporation Category of Control Commands Category Description Queue manager commands commands for creating, starting, stopping, and deleting queue managers and command servers Channel commands commands for starting and ending channels and channel initiators Utility commands • Utility commands include commands associated with: Running MQSC commands • Conversion exits • Authority management • Recording and recovering media images of queue manager resources • Displaying and resolving transactions • Trigger monitors • Displaying the file names of WebSphere® MQ objects • The File Transfer Application Example: crtmqm -u SYSTEM.DEAD.LETTER.QUEUE JKT1QM
  • 69. © 2010 IBM Corporation Using MQ Script (MQSC)  to manage queue manager objects (queue manager itself, queues, process definitions, channels, client connection channels, listeners, services, namelists, clusters, and authentication information objects)  The runmqsc command is used for issue MQSC commands to a queue manager – Verify a command without running it – Run a command on a local queue manager – Run a command on a remote queue manager  Running MQSC commands interactively – MQSC commands are processed by the default queue manager: runmqsc – MQSC commands are processed by specified queue manager: runmqsc QM1 – terminate command input explicitly by entering a semicolon (;)  Running MQSC commands from text files, example: – runmqsc < myprog.in – runmqsc QM1 < myprog.in > myprog.out
  • 70. © 2010 IBM Corporation Using MQSC  continuation characters – A minus sign (-) indicates that the command is to be continued from the start of the following line. – A plus sign (+) indicates that the command is to be continued from the first nonblank character on the following line.
  • 71. © 2010 IBM Corporation MQSC Examples  Displaying queue manager attributes – DISPLAY QMGR  Altering queue manager attributes – ALTER QMGR DEADQ (ANOTHERDLQ) INHIBTEV (ENABLED)  Defining a local queue – DEFINE QLOCAL (ORANGE.LOCAL.QUEUE) + DESCR('Queue for messages from other systems') + PUT (ENABLED) + GET (ENABLED) + NOTRIGGER + MSGDLVSQ (PRIORITY) + MAXDEPTH (5000) + MAXMSGL (4194304) + USAGE (NORMAL);  Copying a local queue definition – DEFINE QLOCAL (MAGENTA.QUEUE) LIKE (ORANGE.LOCAL.QUEUE)  Changing local queue attributes – Change single attribute: ALTER QLOCAL (ORANGE.LOCAL.QUEUE) MAXMSGL(10000) – DEFINE QLOCAL (ORANGE.LOCAL.QUEUE) MAXMSGL(10000) REPLACE  Clearing a local queue – CLEAR QLOCAL (MAGENTA.QUEUE)  Deleting a local queue – DELETE QLOCAL (PINK.QUEUE) PURGE
  • 72. © 2010 IBM Corporation LAB 5 : Using Control Commands & MQSC Command In this Lab, you will Show list queue manager and its status start, stop a queue manager (immediate shutdown, preemtive shutdown) Working with queue and queue alias Use the control commands interactively Use the control commands with a command file Use the sample programs
  • 73. © 2010 IBM Corporation MQ Client
  • 74. © 2010 IBM Corporation  A component of the WMQ product that can be installed on a system on which no queue manager runs.  Available for platform: – UNIX systems (AIX, HP-UX, Linux, Solaris) – Windows  Available as SupportPac and free under the standard terms and conditions What is WebSphere MQ client MQI Channel (bi-directional)
  • 75. © 2010 IBM Corporation Why using MQ Client  When to use MQ Client? – There is no need for a full WebSphere MQ implementation on the client machine. – Hardware requirements on the client system are reduced. – System administration requirements are reduced. – a WebSphere MQ application running on a client can connect to multiple queue managers on different systems. – Alternative channels using different transmission protocols can be used.
  • 76. © 2010 IBM Corporation Extended Transactional Client a WebSphere MQ base client with the addition of the extended transactional function  Allow a client application within the same unit of work to: – To put messages to, and get messages from, queues that are owned by the queue manager to which it is connected. – To update the resources of a resource manager other than a WMQ queue manager, the table of a database, for example.  Client application then can commit (MQCMIT) or back out (MQBACK) the unit of work  Queue manager act as transaction manager
  • 77. © 2010 IBM Corporation MQ Server vs Client Feature Servers Extended Transactional Client Standard Client Provides Queue Manager? Yes No No Enables Asynchronous Messaging? Yes No (1) No (1) Queue operations within single Unit of Work (UOW)? Yes Yes (2) No Manages Units of Work? Yes No (3) No Workload management (Clustering support)? Yes No No Runs on z/OS? Yes (4) No No Licensing Server license required Server license required Free. Terms and conditions apply Availability Buy Installation option when installing Server CD or SupportPac download Free since V7.5
  • 78. © 2010 IBM Corporation MQI Channel  MQI channel is bi-directional in term of flow of information  2 types of MQI channel: – CLNTCONN – SVRCONN  Started automatically by client application by issuing MQCONN or MQCONNX call Stopped automatically by an MQDISC call  There can be multiple instances of an MQI channel.  Several clients can use the same SVRCONN channel.
  • 79. © 2010 IBM Corporation How to connect a client to a server  The client must be able to identify which channel it should use to communicate with the queue manager  How to specify the client's connection to a queue manager: – Explicitly on the MQCONNX verb – MQSERVER variable – Client channel tables (CCDT)  Java client programs use either the MQEnvironment Java class or JNDI (using JMS)
  • 80. © 2010 IBM Corporation Defining MQI Channel (1) Two methods of manually creating channel definition: 1. Create one channel definition on the client and the other on the server  Define a server connection on the server, after creating & starting queue manager DEFINE CHANNEL(CHANNEL1) CHLTYPE(SVRCONN) TRPTYPE(TCP) + DESCR('Server-connection to Client_1')  On the client system, there are two ways to specify channel: • Set the environment variable MQSERVER with value ChannelName/TransportType/ConnectionName(Port) Example for Windows: SET MQSERVER=CHANNEL1/TCP/9.20.4.56(1414) • Define the definition of a client-connection channel in MQCD structure in MQCNO structure on an MQCONNX call by MQ application 1 2
  • 81. © 2010 IBM Corporation Defining MQI Channel (2) 2. Define both the server connection and the client connection on the server system  The client connection is stored in the client channel definition table (CCDT) on the server system  CCDT file name is AMQCLCHL.TAB  CCDT file must be accessible by client or can be copied to client system DEFINE CHANNEL(CHANNEL2) CHLTYPE(SVRCONN) TRPTYPE(TCP) + DESCR('Server-connection to Client_2') DEFINE CHANNEL(CHANNEL2) CHLTYPE(CLNTCONN) TRPTYPE(TCP) + CONNAME(9.20.4.26) QMNAME(QM2) DESCR('Client-connection to Server_2')  On the client system, set the environment variable as follow (example for Windows): SET MQCHLLIB="C:IBMWebSphere MQ“ SET MQCHLTAB=AMQCLCHL.TAB Note: MQSERVER environment variable should not be set, otherwise application will use MQSERVER definition instead
  • 82. © 2010 IBM Corporation Auto-definition of channels  Channel definition can be automatically created if there is an incoming request to start a message channel or MQI channel, but no channel definition exists for the specific channel.  The channel definition created automatically using system object as a model: – SYSTEM.AUTO.RECEIVER for RCVR channels, – SYSTEM.AUTO.SVRCONN for SVRCONN channels.  The attribute ChannelAutoDef of the queue manager must be set to MQCHAD_ENABLED – Updating the queue manager object using the ALTER QMGR command with the parameter CHAD(ENABLED) – Call PCF command Change Queue Manager with parameter ChannelAutoDef
  • 83. © 2010 IBM Corporation Precedence for connecting to a QMgr  This is the precedence of the features provided by the MQ client for an application to connect to a queue manager. 1.Pre-connect exit (introduced in MQ 7.1) 2.MQCONN API call 3.MQSERVER environment variable 4.mqclient.ini file (introduced in MQ 7.0) 5.CCDT file
  • 84. © 2010 IBM Corporation 1. Pre-connect exit (7.1)  Pre-connect exit (introduced in MQ 7.1)  Can be used for MQ MQI clients to look up a repository to obtain connection definitions  Allows to store the client definitions in a global repository like an LDAP directory  This is the highest precedence. – If it is available, then it will be used, superseding all other methods.
  • 85. © 2010 IBM Corporation 2. MQCONN API call  The MQCONN or MQCONNX call connects an application program to a queue manager.  It provides a queue manager connection handle, which the application uses on subsequent message queuing calls.  If the name of the queue manager is hardcoded in the application that uses a Client transport type, then it supersedes the other methods: MQSERVER, mqclient.ini and CCDT.
  • 86. © 2010 IBM Corporation 2. MQCONN API call  Example from the sample “amqsbcg0.c” which is used to browse messages from a queue.  The name of the queue manager is provided at runtime: amqsbcg Q1 QMGR1 /* variables for MQCONN */ MQCHAR QMgrName[MQ_Q_MGR_NAME_LENGTH]; MQHCONN Hconn = MQHC_UNUSABLE_HCONN; MQLONG CompCode = MQCC_OK, Reason = MQRC_NONE; … QMgrName[0] = '0'; /* set to null default QM */ if (argc > 2) strncpy(QMgrName, argv[2], MQ_Q_MGR_NAME_LENGTH); … MQCONN(QMgrName,&Hconn,&CompCode,&Reason);
  • 87. © 2010 IBM Corporation 2. MQCONN API Put/Get using Bindings  Scenario: There are 2 client applications: – one for putting a message into a queue, and – another for getting a message  The applications are located in the same host as the queue manager: HOST1  Connect using a transport type of: BINDINGS – local shared memory, no network is used
  • 88. © 2010 IBM Corporation Channel Exits  NOT available to your application if MQSERVER environment variable is set.  Available at both the client and the server end of the channel  Channel Exits: – Send exit – Receive exit – Security exit  client-connection send and receive exits cannot make MQI calls  A default path for location of the channel exits on the client is defined in a configuration file  When a channel is initialized, after an MQCONN or MQCONNX call, ClientExitPath is read in the config file and any channel exits that are specified in the channel definition are loaded.
  • 89. © 2010 IBM Corporation Client Channel Definition Tables (CCDT)  Channel Definition Tables are used in all but the simplest of cases  Can be used for connection to multiple queue managers – Queue managers are specified in a "queue manager group"  A channel definition table (CCDT) is: • A binary file (not editable by a user) • Created by an administrator when client channels are defined • Allows connect options to be specified administratively • Alternative is to use MQSERVER variable and MQCONNX options • Somewhat analogous to Connection Factories with JMS or XMS • In fact, a JMS Connection Factory can reference a CCDT • Located in directory (by default): • <mq root>qmgrsQMGRNAME@ipcc (Windows) • <mq root/qmgrs/QMGRNAME/@ipcc (UNIX) 89 Using WebSphere MQ Clients
  • 90. © 2010 IBM Corporation  You have many MQ client applications in different hosts and you want to connect these applications to different queue managers.  If one of those queue managers is not available, then you want the application to try to connect to another queue manager.  You do not want to hardcode the connection data (queue manager name, channel, port) in the application and you want a flexible way to provide the connection data to the applications.
  • 91. © 2010 IBM Corporation Using Channel Definition Tables: Example 1 91 Using WebSphere MQ Clients How is the QMNAME client channel attribute used? def chl(chl1) chltype(clntconn) trptype(tcp) conname(host1) qmname(mars) def chl(chl2) chltype(clntconn) trptype(tcp) conname(host2) qmname(venus) mars venus MQCONN ("venus",hConn,cc,rc ); chl2 connected via channel chl2 to “venus" MQ ClientAMQCLCHL.TAB
  • 92. © 2010 IBM Corporation Using Channel Definition Tables: Example 2 92 Using WebSphere MQ Clients Multiple routes to the same Queue Manager def chl(chl1) ….trptype(tcp) conname(host1) qmname(mars) def chl(chl2) ….trptype(tcp) conname(tokenring) qmname(venus) def chl(chl3) ….trptype(tcp) conname(ethernet) qmname(venus) def chl(chl4) ….trptype(tcp) conname(dialup) qmname(venus) mars venus MQCONN ("venus",hConn,cc,rc ); chl2 connected via channel chl3 to “venus" MQ ClientAMQCLCHL.TAB chl3
  • 93. © 2010 IBM Corporation Using Channel Definition Tables: Example 3 93 Using WebSphere MQ Clients How do we have back-up Queue Managers ? def chl(chl1) ….trptype(tcp) conname(ip.mars) qmname(planet) def chl(chl2) ….trptype(tcp) conname(ip.venus) qmname(planet) ….. def chl(chl5) ….trptype(tcp) conname(ip.pluto) qmname(planet) mars venus MQCONN (“*planet",hConn,cc,rc ); Notice the ‘*’ preceding the Queue Manager name MQ ClientAMQCLCHL.TAB pluto
  • 94. © 2010 IBM Corporation How do I create and deploy a channel table ? RUNMQSC def chl(...) chltype(clntconn) …. copy c:mqmqmgrsQMGRNAME@ipcc AMQCLCHL.TAB to z:mytable.tbl
  • 95. © 2010 IBM Corporation Using Channel Definition Tables: Example 4 95 Using WebSphere MQ Clients10/10/15 Name CHLTYPE TRPTYPE CONNAME QMNAME CLNTWGHT AFFINITY chl1 CLNTCONN TCP ip.mars planet 4 PREFERRED chl2 CLNTCONN TCP ip.venus planet 4 PREFERRED chl3 CLNTCONN TCP ip.pluto planet 2 PREFERRED MQCONN(*planet) 40% 40% 20% mars venus pluto
  • 96. © 2010 IBM Corporation Limiting client connections Starting MQSC for queue manager TEST1. DEFINE CHANNEL(SALES.CONNECT) CHLTYPE(SVRCON N) MAXINST(4) MAXINSTC(2) Queue ManagerQueue Manager SVRCONN MAXINST(4) MAXINSTC(2) • MAXINST • restricts the number of instances in total for the specific channel name. • MAXINSTC • restricts the number of instances from a specific IP address for that channel name.
  • 97. © 2010 IBM Corporation Client conversation (connection) sharing  Client channels have three modes of operation: – No multiplexing, no conversation sharing • Separate socket for each MQ client conversation • No multiplexing benefits – Multiplexing, no conversation sharing • Still a separate socket for each MQ client conversation, but benefits of multiplexed channels available – Multiplexing AND conversation sharing • MQ client conversations share a socket connection, and can utilize benefits of multiplexed channels Starting MQSC for queue manager TEST1. DEFINE CHANNEL(SALES.CONNECT) CHLTYPE(SVRCONN) SHARECNV(10) DIS CHS(SALES.CONNECT) AMQ8417: Display Channel Status details. CHANNEL(SALES.CONNECT) CHLTYPE(SVRCONN) CONNAME(127.0.0.1) CURRENT MCAUSER(hughson) STATUS(RUNNING) SUBSTATE(RECEIVE) CURSHCNV(3) MAXSHCNV(10) Queue ManagerQueue Manager
  • 98. © 2010 IBM Corporation Performance option - Client Read-Ahead MQ Client/Server flows without Read-ahead of messages Using WebSphere MQ Clients ClientClient MQCONN MQOPEN MQGET MQGET MQGET ServerServer ●Each API request flows over the network ●The client blocks waiting for a reply ●For MQGet, each message is returned over the network and passed to the application ●Messages are never queued on the client end
  • 99. © 2010 IBM Corporation Performance option - Client Read-Ahead MQ Client/Server flows with Read-ahead of messages ClientClient MQCONN MQOPEN MQGET MQGET MQGET ServerServer Request for ‘n’ messages ●Some API requests flow over the network synchronously ●For MQGet, a batch of messages are requested ●Messages are buffered on the client end ●Messages are passed to the application individually from the client-side buffer ●Can result in significant throughput improvement for certain types of applications In particular, applications that stream messages to clients
  • 100. © 2010 IBM Corporation Performance option - Client Asynchronous Put MQ Client/Server flows without Asynchronous Put ClientClient MQCONN MQOPEN MQOPEN MQPUT MQPUT MQPUT MQPUT MQCMIT ServerServer ●Each API request flows over the network ●The client blocks waiting for a reply ●For MQPut, each message is sent over network to the queue manager There it must be written to the queue May also need to be logged Then control returns to the application
  • 101. © 2010 IBM Corporation Performance option - Client Asynchronous Put MQ Client/Server flows with Asynchronous Put ClientClient MQCONN MQOPEN MQOPEN MQPUT MQPUT MQPUT MQPUT MQCMIT ServerServer ● Some API requests flow over the network synchronously ● For MQPut, control is returned immediately to the application Messages are buffered on the client end and forwarded to the queue manager asynchronous to the client application Status of each MQPut is maintained on client end ● At commit, put requests are reconciled with responses; if any failed, unit-of-work is rolled back Client app can optionally request status of put messages ● Async Put can result in significant throughput improvement for certain types of applications In particular, applications that stream messages from clients
  • 102. © 2010 IBM Corporation MQ Client Security  Two aspects to consider – Authentication • Since V7.1 introduced Channel Authentication Records (CHLAUTH) • CHLAUTH will be enabled by default and has are three rules provided with a queue manager – DISPLAY QMGR CHLAUTH – ALTER QMGR CHLAUTH(DISABLED) • Blocked by CHLAUTH will result error message like AMQ9777: Channel was blocked – Access control.
  • 103. © 2010 IBM Corporation MQ Client Security: Authentication  3 Level Security – Transport level – Channel security exits – Identification passed to a channel security exit
  • 104. © 2010 IBM Corporation Client Security - SSL Client Server DEF CHANNEL ('SYSTEM.DEF.SVRCONN') CHLTYPE(SVRCONN) SSLCAUTH(REQUIRED) SSLCIPH('RC4_MD5_US') SSLPEER('CN="*", O="IBM", C="US"') Authentication, Encryption, Integrity DEF CHANNEL('SYSTEM.DEF.CLNTCONN') CHLTYPE(CLNTCONN) SSLCIPH('RC4_MD5_US') SSLPEER('CN=“user", O="IBM",C="US"') SSL facility • key repository • MQSSLKEYR environment variable SSL facility • key repository
  • 105. © 2010 IBM Corporation Access Control  Access control is based upon user IDs  Access denied – MQCC_FAILED – MQRC_NOT_AUTHORIZED  No connection handle is returned ConnectionUser ID check. Connection might be denied Local Queue Manager
  • 106. © 2010 IBM Corporation LAB 6 – WebSphere MQ Client Installation & Verification In this Lab, you will Find out how to get WebSphere MQ Client V7.5 (MQC75) from IBM site Install WebSphere MQ Client installation on Windows Verifying the installation by testing communication between a client and a server – Setting up MQ Server for client connection – Using sample program (amqsputc, amqsgetc)
  • 107. © 2010 IBM Corporation PUBLISH/SUBSCRIBE
  • 108. © 2010 IBM Corporation Point to Point Examples 108 Overview of Publish / Subscribe ●Message Queuing If I put a single message it will go to a single consumer ●eMail Might go to lots of people but I get to choose exactly who gets it ●Post Card Goes to just the person I send it to
  • 109. © 2010 IBM Corporation Publish / Subscribe Examples 109 Overview of Publish / Subscribe  Magazine Publishing – In the US, over 10,000 titles published  Airline Departure Boards – Boards might display (subscribe to) • All departures • Departures from this terminal • Departures by this airline ● RSS News Feeds
  • 110. © 2010 IBM Corporation Loose coupling with Pub/Sub 110 Overview of Publish / Subscribe Publisher Subscriber Topic Provider Subscriber Subscriber Subscriber Publisher Publisher Publisher Subscriber Topic Topic Publisher Publisher Subscriber Subscriber Topic 1:1 1:many many:1 many:many
  • 111. © 2010 IBM Corporation WebSphere MQ Implementation of Publish/Subscribe  Central concept is the TOPIC STRING  Messages are “published” to a Topic string – Each act of publishing is to a single Topic string  Subscribers are delivered messages that were published to the Topic string(s) they registered an interest in (subscribed to) – Subscribers may register interest in multiple topics – Wildcards can be used to filter topic names – Selectors can be used to filter message properties  Topic strings can be created and secured administratively, or dynamically by simply being referenced by publishers and subscribers 111 Overview of Publish / Subscribe
  • 112. © 2010 IBM Corporation Publish/Subscribe applications  Applications connect to local queue managers  They can be different queue managers connected by a network.  Can use JMS as well as any MQ API  They are “connected” through a topic string 112 Overview of Publish / Subscribe QM QM QM Publishing Application Subscribing Application Subscribing Application QM Subscribing Application Publish/Subscribe NetworkPublish/Subscribe Network
  • 113. © 2010 IBM Corporation Concepts – Topic String  A Topic string is an unlimited length string  A topic string “connects” publishers and subscribers  Has a “structure” and a semantics in it – The structure is supplied by the “/” slash character – Similar to directory structure on UNIX® or Windows® • e.g. ”/news/sports/football/teams/minnesota”  The semantics are implied by the use of wildcards in subscriptions – “#” and ‘+’ are used as wildcard characters in subscriptions • e.g. ”/news/+/football/#” 113 Overview of Publish / Subscribe
  • 114. © 2010 IBM Corporation Concepts – Topic Tree 114 Overview of Publish / Subscribe  A topic tree is an internal representation of the topic hierarchy  It has a root node at the very top  It is implied from the complete set of topic strings in use - defined, published to, subscribed to.  There is not necessarily a one-to- one mapping between topic objects and nodes in the tree footballfinance … … football/teams football/teams/minnesota “” (root)
  • 115. © 2010 IBM Corporation Concepts – Topic Object  A Topic Object is a WebSphere MQ object that can be administered  A Topic Object has a name following the same rules as other WebSphere MQ objects (Queues etc)  The Topic String is one of the properties of a Topic Object – Topic Objects can have other properties set  Security can be applied to Topic Objects  Application programs using the MQI can use the topic object as a full or partial alternative to topic string when publishing or subscribing – JMS programs would use the Destination object, which maps to a Topic or Queue object in WebSphere MQ 115 Overview of Publish / Subscribe
  • 116. © 2010 IBM Corporation Concepts – Topic Tree 116 Overview of Publish / Subscribe  Nodes which have topic objects defined for them can be thought of as administered nodes  They are permanent parts of the hierarchy  They can have properties specified for them  They have topic object names, which need not reflect the topic strings DEFINE TOPIC(FOOTBALL) TOPICSTR(‘football’) football finance … … football/teams football/teams/minnesota “” (root) SYSTEM.BASE.TOPIC FOOTBALL MINN_TEAM
  • 117. © 2010 IBM Corporation Concepts – Topic Tree 117 Overview of Publish / Subscribe  The Topic Tree can be dynamically extended by a publisher and/or subscriber – Any missing parts of the tree hierarchy will be “filled in” when administered nodes are defined  Dynamically added nodes in the Topic Tree inherit all properties from their parent, i.e. from an administered node above them Admin node Non-admin node Admin node Non-admin node footballfinance … … football/teams football/teams/minnesota “” (root) SYSTEM.BASE.TOPIC FOOTBALL MINN_TEAM Node “football/teams” automatically added.
  • 118. © 2010 IBM Corporation Concepts – Topic Tree 118 Overview of Publish / Subscribe  Publishing or subscribing to a topic string that is not yet in the tree causes the tree to be extended  They are temporary parts of the hierarchy and will be removed when no remaining publishers or subscribers exist  These nodes inherit all properties from their parent, and so from an administered node above them MQSUB(‘/football/teams/greenbay/transfers’) Admin node Non-admin node Admin node Non-admin node footballfinance … … football/teams football/teams/derby “” (root) SYSTEM.BASE.TOPIC FOOTBALL MINN_TEAMfootball/teams/greenbay football/teams/greenbay/transfers
  • 119. © 2010 IBM Corporation Concept - Subscriptions  A subscription is to a topic string – Wildcards can be used to set them up, but in essence they are to a topic string – Corresponds to a node in the topic tree  Subscriptions can be durable, or not – Non-durable subscriptions mean messages are delivered to you only while you are connected – Messages for durable subscriptions are delivered even when disconnected, and can be retrieved when you next connect  Subscription destinations can be managed, or not – With a managed destination a subscription queue is automatically created when you create a subscription, and is tidied up automatically in accordance with the durability of the subscription – With an unmanaged destination, you specify your own queue at the time the subscription is opened  Subscriptions can be registered programmatically or administratively 119 Overview of Publish / Subscribe
  • 120. © 2010 IBM Corporation Concept - Retained Publications  Most recent message published on a given topic – Each node on the topic tree can have at most one Retained Publication  Whether a publication is “retained” is determined at publish time by the application program  A subscriber can request, at anytime, the current retained publication for a given topic  Example StockPrice.CurrentPrice is a retained publication – I can be notified whenever it changes – ticker tape – Or I can request it at any time 120 Overview of Publish / Subscribe 120
  • 121. © 2010 IBM Corporation Administered Subscription 121 Overview of Publish / Subscribe  Has a name conforming to usual MQ rules – Sample attributes • TOPICSTR – Topic string, basically unlimited length TOPICSTR( ‘/football/teams/#’) • DEST – Name of object to which messages for this subscription will be forwarded DEST(MY.QUEUE) • DESTQMGR – Remote queue manager to which messages are forwarded DESTQMGR(REMOTE.QMGR)
  • 122. © 2010 IBM Corporation Distributed Pub/Sub Topologies  Two types of distributed Pub/Sub topologies are supported –Publish/Subscribe Clusters • Queue managers are connected using a “network” or “mesh” connectivity model • MQ Clustering technology is used to provide connectivity between participating queue managers • Publications from any queue manager in the cluster may be subscribed to by any other • Enables multiple paths for publications, can eliminate single points of failure –Publish/Subscribe Hierarchies • Queue managers are arranged in a Parent/Child Hierarchy • Each Queue manager may have only one Parent • Queue managers may exchange Pub/Sub information directly between only their parent or children • This approach may require multiple hops and/or create single points of failure  A Publish/Subscribe network can be created that combines both of these topologies 122 Overview of Publish / Subscribe
  • 123. © 2010 IBM Corporation Example of a Publish/Subscribe Cluster 123 Overview of Publish / Subscribe QM QM QM Pub Sub Sub QM Sub •Consistent definitions in cluster •Multiple routes across cluster
  • 124. © 2010 IBM Corporation Example of a Publish/Subscribe Hierarchy 124 Overview of Publish / Subscribe QM QM QM QM QM QM QMPub Sub
  • 125. © 2010 IBM Corporation Publish/Subscribe in the WebSphere MQ Explorer 125 Overview of Publish / Subscribe
  • 126. © 2010 IBM Corporation Topic Objects 126 Overview of Publish / Subscribe Topic Object Name Topic String • Topic Attributes are associated with a Topic Object • The Topic Object is a WebSphere MQ object that can be administered • The Topic String is one of the properties of a Topic Object • The topic string “connects” publishers and subscribers • A Topic string is an unlimited length string • Topic Objects can have other properties set
  • 127. © 2010 IBM Corporation Topic Status – current usage of topics  DISPLAY TPSTATUS( topic-string ) – Topic attributes (TYPE(TOPIC)) • Number of publishers and subscribers • Whether a retained publication exists – Subscriber info (TYPE(SUB)): • Last resume date of subscription and last message delivery time • Number of messages sent to this subscriber – Publisher info (TYPE(PUB)): • Last publish time • Number of messages published 127 Overview of Publish / Subscribe
  • 128. © 2010 IBM Corporation Administered Subscriptions Overview of Publish / Subscribe128 •Subscriptions that are administratively created require a name •A Topic Object can optionally be referenced •The Topic String is required •Wildcards may be used •By definition, an administered subscriptions is durable •Administered subscriptions can use either managed or unmanaged destinations Subscription Object Name Topic String Topic Object Name (optional) Overview of Publish / Subscribe128
  • 129. © 2010 IBM Corporation Testing Publish and Subscribe Overview of Publish / Subscribe129
  • 130. © 2010 IBM Corporation Benefits of Publish/Subscribe with WebSphere MQ  Applications are more loosely coupled than with point-to-point – No need to agree on queue names, number of receivers, etc  Applications decide their message exchange patterns – One-to-one – One-to-many – Many-to-one – Many-to-many  Messages are “published” to a Topic string – Which can be created dynamically – …or administratively for more control over security, etc  Subscribers receive messages they registered an interest in – Subscribers may register interest in multiple topics – Wildcards can be used to filter topic names – Selectors can be used to filter message properties 130 Overview of Publish / Subscribe
  • 131. © 2010 IBM Corporation131 Lab 3 – WebSphere MQ Publish/Subscribe Pub/Sub Administration Using the WebSphere MQ Explorer ● In the third lab you will explore Publish/Subscribe administration using the MQ Explorer Overview of Publish / Subscribe
  • 132. © 2010 IBM Corporation WebSphere MQ Application
  • 133. © 2010 IBM Corporation Application programming  Message Queue Interface (MQI) – a set of calls with which you can send and receive messages, and manipulate MQ objects. – a simple API that is consistent across all platforms  MQ Objects: – Queue managers – Queues – Administrative topic objects – Namelists – Services – Listeners – Process definitions – Channels – Storage classes (WebSphere® MQ for z/OS® only) – Authentication information objects
  • 134. © 2010 IBM Corporation HP-UX Windows zLinux Solaris AIX OS/400 NSS OVMS Programming Interface zOS Linux 80+ platform configurations WebSphere MQ MQ Interface COBOL, C, RPG, VB, PL/1, TAL, others Base Classes For Java Java XMS C, C++, .NET C# .NET (C#) Microsoft SOAP Web Services Other Interfaces HTTP, FTP, … Multiple APIs – Supports the broadest range of APIs, programming languages and OS platforms – Provides the only JMS engine that can be implemented on “any” standards-compliant JEE server – Provides rich web services interfaces meeting customer needs for WS-Reliability
  • 135. © 2010 IBM Corporation XMS Clients a non-Java implementation of the Java Message Service (JMS) API  Freely available for .NET and C/C++  Can be downloaded as SupportPac • IA9H: IBM Message Service Client (XMS) for .NET http://www-01.ibm.com/support/docview.wss?uid=swg24011756 • IA94: IBM Message Service Client (XMS) for C/C++ http://www-01.ibm.com/support/docview.wss?uid=swg24007092
  • 136. © 2010 IBM Corporation Planning Your Design  What types of queue should you use?  Should you use shared queues and queue-sharing groups, and should you use queue- sharing group clusters only?  Should you use queue manager clusters?  What types of message should you use?  Should you use publish/subscribe or point-to-point messaging?  How can you control your WebSphere MQ programs?  Will your application run on a WebSphere MQ client?  Will your application run on a WebSphere MQ server?  How should you handle exceptions and errors?
  • 137. © 2010 IBM Corporation Design Your Message  What type of message should I use?  Should I assign different priorities to some of the messages that I create?  Will my messages be discarded when the queue manager restarts?  Do I want to give information about myself to the recipient of my messages?  How many queues will receive my messages?
  • 138. © 2010 IBM Corporation The message queue interface (MQI) philosophy  Simple call interface  Limited number of calls  Rich in function  Sensible default and initial values  Supplied “include” files and “copy” files for the definitions of structures and constants
  • 139. © 2010 IBM Corporation Common MQI Calls
  • 140. © 2010 IBM Corporation Other common MQI Calls MQPUT1 Opens a queue manager, places a message on the queue, and closes the queue manager MQINQ Queries the attributes of a WebSphere MQ object MQSET Changes the attributes of a queue MQCONNX Connects to a queue manager using the specified options MQBEGIN Begins a unit of work coordinated by the queue manager MQCMIT Commits all message PUT and GET operations made since the last syncpoint MQBACK Backs out all message PUT and GET operations made since the last syncpoint MQSUB Register subscriptions to a previously published topic MQSUBR Request a retained publication
  • 141. © 2010 IBM Corporation  WebSphere MQ Application Programming Reference MQPUT1 (Hconn, ObjDesc, MsgDesc, PutMsgOpts, BufferLength, Buffer, CompCode, Reason)  C equivalent MQPUT1 (Hconn, &ObjDesc, &MsgDesc, &PutMsgOpts, BufferLength, Buffer, &CompCode, &Reason);  COBOL equivalent CALL "MQPUT1" USING HCONN, OBJDESC, MSGDESC, PUTMSGOPTS, BUFFERLENGTH, BUFFER, COMPCODE, REASON.
  • 142. © 2010 IBM Corporation MQCONN Call
  • 143. © 2010 IBM Corporation MQCONNX Call
  • 144. © 2010 IBM Corporation MQOPEN Call
  • 145. © 2010 IBM Corporation Queue definition and independence Four types of queue that an application can open: •Local queues •Remote queues (local definitions of remote queues; cannot be opened for input) •Alias queues •Model queues (used to create queues dynamically)
  • 146. © 2010 IBM Corporation Model queue definition
  • 147. © 2010 IBM Corporation MQ Open share options
  • 148. © 2010 IBM Corporation MQPUT Calls
  • 149. © 2010 IBM Corporation MQGET Calls
  • 150. © 2010 IBM Corporation MQGET get message options  Wait  Set signal  Browse from start of queue  Browse from current position in queue  Get message under browse cursor  Within syncpoint control  Outside of syncpoint control  Accept truncated message  Convert application data
  • 151. © 2010 IBM Corporation MQINQ Calls
  • 152. © 2010 IBM Corporation MQSET Calls
  • 153. © 2010 IBM Corporation PROGRAMMING
  • 154. © 2010 IBM Corporation Sample Function Documentation  Syntax for MQCONN – MQCONN (QMgrName, Hconn, CompCode, Reason)  Parameters for MQCONN The MQCONN call has the following parameters. – QMgrName (MQCHAR48) – input Queue manager names can contain certain characters, and there are other restrictions on their formation. You can use special values of QMgrName to indicate a default queue manager, a queue-sharing group, or a choice of queue managers. – Hconn (MQHCONN) – output – CompCode (MQLONG) – output – Reason (MQLONG) – output The reason code qualifying CompCode.  Usage notes for MQCONN Description of function usage
  • 155. © 2010 IBM Corporation Sample Function Documentation  Language invocations for MQCONN – C invocation • MQCONN (QMgrName, &Hconn, &CompCode, &Reason); • Declare the parameters as follows: MQCHAR48 QMgrName; /* Name of queue manager */ MQHCONN Hconn; /* Connection handle */ MQLONG CompCode; /* Completion code */ MQLONG Reason; /* Reason code qualifying CompCode */ – COBOL invocation • CALL 'MQCONN' USING QMGRNAME, HCONN, COMPCODE, REASON. • Declare the parameters as follows: ** Name of queue manager 01 QMGRNAME PIC X(48). ** Connection handle 01 HCONN PIC S9(9) BINARY. ** Completion code 01 COMPCODE PIC S9(9) BINARY. ** Reason code qualifying COMPCODE 01 REASON PIC S9(9) BINARY. – Other languages
  • 156. © 2010 IBM Corporation Connection Handle  MQCONN(name, Hconn, …  MQOPEN(Hconn, …  MQPUT(Hconn, …  MQGET(Hconn, …  MQCLOSE(Hconn, …  MQOPEN(Hconn, …  MQPUT(Hconn, …  MQGET(Hconn, …  MQCLOSE(Hconn, …  MQDICS(Hconn, …  Unique. It is not intended to be used by the program in any way BUT to interface with the MQI  Scope of the handle restricted to smallest unit of parallel execution – UNIX/Windows/Linux  Thead – OS/400  Job – DOS Client  System – z/OS  CICS Task, IMS Task, Batch/TSO Task EXAMPLE
  • 157. © 2010 IBM Corporation Object Handle  MQCONN(name, Hconn, …  MQOPEN(Hconn,ObjDesc,Options,Hobj,…  MQPUT(Hconn,Hobj,…  MQGET(Hconn,Hobj,…  MQCLOSE(Hconn,Hobj,…  QOPEN(Hconn,ObjDesc,Options,Hobj,…  MQPUT(Hconn,Hobj,…  MQGET(Hconn,Hobj,…  MQCLOSE(Hconn,Hobj,…  MQDICS(Hconn, …  The object handle represents the access that has been established to the queue EXAMPLE
  • 158. © 2010 IBM Corporation More than one object handle EXAMPLE
  • 159. © 2010 IBM Corporation Completion codes  MQCC_OK – The call completed fully; all output parameters have been set. The Reason parameter always has the value MQRC_NONE in this case.  MQCC_WARNING – The call completed partially. Some output parameters might have been set in addition to the CompCode and Reason output parameters. The Reason parameter gives additional information about the partial completion.  MQCC_FAILED – The processing of the call did not complete. The state of the queue manager is unchanged, except where specifically noted. The CompCode and Reason output parameters have been set; other parameters are unchanged, except where noted.
  • 160. © 2010 IBM Corporation Reason codes  The reason code parameter (Reason) qualifies the completion code parameter (CompCode) • If CompCode is MQCC_OK:  MQRC_NONE (0, X'000') No reason to report. • If CompCode is MQCC_WARNING:  MQRC_ALREADY_CONNECTED (2002, X'7D2') Application already connected.  MQRC_CLUSTER_EXIT_LOAD_ERROR (2267, X'8DB') Unable to load cluster workload exit.  MQRC_SSL_ALREADY_INITIALIZED (2391, X'957') SSL already initialized. • If CompCode is MQCC_FAILED  MQRC_ADAPTER_CONN_LOAD_ERROR (2129, X'851') Unable to load adapter connection module.  MQRC_ADAPTER_DEFS_ERROR  (2131, X'853') Adapter subsystem definition module not valid ETC
  • 161. © 2010 IBM Corporation Transaction EXAMPLE Before LUW committed : •Message remain in Q1 and marked for deletion but it is not available to be retrieved by other programs •Inserted data in database is not visible to other programs. •Message has been put in Q2 is not visible to other programs. The current depth reflects these messages but any attempt to use MQGET to retrieve them fails with MQRC_NO_MSG_AVAILABLE If problem is encountered, all activities associated with the LUW can be backed out
  • 162. © 2010 IBM Corporation Local unit of work  Syncpoint coordination using single phase commit provided by QM  Start a unit of work by setting the syncpoint option for each message operation – MQGET = MQGMO_SYNCPOINT – MQPUT and MQPUT1 = MQPMO_SYNCPOINT  Ending the unit of work: – MQCMIT commits the operations – MQBACK rolls back the operations – MQDISC commits the operations – Connection broken without MQDISC, a rollback happens. MQPUT #with syncpoint opt MQGET #with syncpoint opt MQPUT #with syncpoint opt If RC = O # no errors MQCMIT #commit Else #errors MQBACK #rollback
  • 163. © 2010 IBM Corporation Global unit of work  Different resource manager and their activities can be combined (e.g Database operations)  Coordinated by: • Queue manager (internal syncpoint coordination) Using MQBEGIN, MQCMIT, MQBACK • External transaction manager MQBEGIN, MQCMIT, MQBACK is not required. Error code MQRC_ENVIRONMENT_ERROR if those functions called. MQPMO_SYNCPOINT or MQGMO_SYNCPOINT should be specified for MQPUT or MQGET
  • 164. © 2010 IBM Corporation MQBEGIN Calls
  • 165. © 2010 IBM Corporation MQCMIT calls
  • 166. © 2010 IBM Corporation MQBACK calls  After rollback, any messages that had been retrieved using an MQGET in syncpoint will have the BackoutCount incremented by one.
  • 167. © 2010 IBM Corporation Pseudo code - Transaction DEFINE GET_OPTIONS AS MQGMO DEFINE PUT_OPTIONS AS MQPMO CALL MQCONN(..., CALL MQOPEN(..., GET_OPTIONS.Options = MQGMO_NO_WAIT + MQGMO_SYNCPOINT + MQGMQAIL_IF_QUIESCING CALL MQGET(..., PUT_OPTIONS.Options = MQPMO_SYNCPOINT + MQPMO_FAIL_IF_QUIESCING CALL MQPUT1(..., CALL MQCMIT(..., EXAMPLE
  • 168. © 2010 IBM Corporation Platform considerations for transaction
  • 169. © 2010 IBM Corporation Trigger Monitor
  • 170. © 2010 IBM Corporation Trigger conditions  Trigger conditions is set up as part of queue definition  Trigger when… – First message arrived (TRIGTYPE=MQTT_FIRST) – Some messages arrived (TRIGTYPE=MQTT_DEPTH, TRIGDPTH=X) – Every message arrived (TRIGTYPE=MQTT_EVERY)
  • 171. © 2010 IBM Corporation Trigger message (MQTM)  Trigger message format: – MQTM, – MQTMC  used only by AS/400 – MQTMC2  Fields: – Strucid – Version – QName – ProcessName – TriggerData – ApplType (blank in TMC2) – Applid – EnvData – UserData – QMgrName (TMC2)
  • 172. © 2010 IBM Corporation Pseudo code - Trigger DEFINE OBJJJESC AS MQOD DEFINE PRIG AS MQTMC2 DEFINE CONN_HANDLE AS MQHCONN DEFINE OBJ_HANDLE AS MQHOBJ COPY INPUTPARAMETER TO TRIG QMNAME = PRIG.QMgrName QNANE = TRIG.QName CALL MQCONN (QMNAME, CONN_HANDLE, . ..) OBJ_DESC.ObjectName = QNAME CALL MQOPEN(CONN_HANDLE, OBJ_DESC, ..., OBJ_HANDLE, ...) CALL MQGEP (CONN_HANDLE, OBJ_HANDLE, ...) EXAMPLE
  • 173. © 2010 IBM Corporation Data conversion  Character data is being exchanged between platforms where the CodedCharSetId and Encoding fields differ  Performed by – The queue manager • Using MQXCNVC (convert characters) call – User exit program
  • 174. © 2010 IBM Corporation Sample COBOL code: MQPUT  http://localhost:49253/help/index.jsp?topic=/com.ibm.mq.csqzal.doc/fg18930_.htm
  • 175. © 2010 IBM Corporation PROGRAMMING USING JAVA
  • 176. © 2010 IBM Corporation WebSphere MQ Java API Alternatives  WebSphere MQ classes for Java Message Service (WebSphere MQ JMS)  WebSphere MQ classes for Java (WebSphere MQ base Java) MQ Interface (MQI) Base Classes For Java  MQ Classes for JMS – Benefits: • Provider-independence and standards • Easy publish/subscribe • Administrative configuration via JNDI • Message selection • Integration with J2EE Application Servers  MQ Classes for Java – Object oriented form of MQI – Full access to MQ capabilities • JMS has a few restrictions, such as no support for distribution lists
  • 177. © 2010 IBM Corporation MQ Classes for Java  Connection options – As a WebSphere MQ MQI client using TCP/IP – In bindings mode, connecting directly to WebSphere MQ using the JNI • Mostly provides better performance • Application must run on the same system as the queue manager  Contains in com.ibm.mq.jar & com.ibm.mq.jmqi.jar  Lib directory – MQ_INSTALLATION_PATHjavalib or lib64  Sample directory – Unix/Linux: MQ_INSTALLATION_PATH/samp/wmqjava/ – Windows: MQ_INSTALLATION_PATHtoolswmqjava
  • 178. © 2010 IBM Corporation Sample Java code: MQ Classes for Java Sample can be found in <INSTALL_DIR>/tools/wmqjava/samples MQQueueManager qMgr = new MQQueueManager(“QMANAGER1”); int openOptions = MQConstants.MQOO_INPUT_AS_Q_DEF | MQConstants.MQOO_OUTPUT; MQQueue queue = qMgr.accessQueue("QUEUE1", openOptions); MQMessage msg = new MQMessage(); msg.writeUTF("Hello, World!"); MQPutMessageOptions pmo = new MQPutMessageOptions(); queue.put(msg, pmo); Create a connection to the QueueManager Set up the options on the queue we wish to open Now specify the queue that we wish to open and the open options Define a simple WebSphere MQ Message Specify the default put message options Put the message to the queue
  • 179. © 2010 IBM Corporation Sample Java code (cont’d) MQMessage msg = new MQMessage(); MQGetMessageOptions gmo = new MQGetMessageOptions(); queue.get(msg, gmo); String msgText = msg.readUTF(); queue.close(); qMgr.disconnect(); Define a WebSphere MQ message to receive the data Specify default get message options Get the message off the queue and read the text from message Close the queue Disconnect from the QueueManager
  • 180. © 2010 IBM Corporation LAB 8: Programming with MQ Classes for Java  In this Lab, you will learn: – Using Eclipse to setup Java project for MQ application – Creating Java application using sample code to GET and PUT data from/into a queue
  • 181. © 2010 IBM Corporation Java Message Service (JMS) - Overview  JMS is the standard Java API for messaging – Point-to-point messaging domain – Publish/subscribe messaging domain  Vendor-independent Messaging API in Java – Specification owned by Sun Microsystems – Managed by The Java Community Process – Expert Group includes IBM  Part of Java 2 Enterprise Edition 1.3 and later  Defines package of Java Interfaces – Gives provider-independence – Does not give provider interoperability • A standard API, not a standard ‘wire format’
  • 182. © 2010 IBM Corporation JMS for WebSphere MQ WebSphere MQ Server JMS Application JMS layer JAVA layer MQI Application MQI Pub/Sub Broker WebSphere MQ ServerMQ Protocol JVM JMS Application JMS layer JAVA layer JVM MQI Application MQI MQI MQI
  • 183. © 2010 IBM Corporation JMS Key Concepts - Architecture
  • 184. © 2010 IBM Corporation  Connection Factory: An administered object that creates a connection to the provider's underlying messaging system.  Connection: An active connection to a provider.  Session: A single-threaded context for sending and receiving messages.  Message Producer: Used for sending messages.  Message Consumer: Used for receiving messages.  Destination: An administered object that encapsulates the identity of a message destination, such as where messages are sent to or received from.
  • 185. © 2010 IBM Corporation JMS 1.1 Unified Interfaces
  • 186. © 2010 IBM Corporation Point to Point Messaging
  • 187. © 2010 IBM Corporation Point to Point Sample Code
  • 188. © 2010 IBM Corporation Publish/Subscribe Messaging  NB This example shows JMS 1.0.2 Interfaces
  • 189. © 2010 IBM Corporation Publish/Subscribe Sample Code
  • 190. © 2010 IBM Corporation JMS Message  Header Fields – MessageId, CorrelationId – Destination, ReplyTo – Priority, Timestamp, Expiry – …  Properties – Name/Value pairs – JMSX – Extended, optional header fields – JMS_<Vendor> – Vendor-specific metadata – User – Application-defined metadata  Body – Text – Textual character data – Bytes – Raw byte stream – Map – Collection of named, typed fields – Stream – Sequence of typed fields
  • 191. © 2010 IBM Corporation JMS Message Format for WebSphere MQ Data JMS Message JMS Client RFH2 Other Data MQ Message Data Data JMS Message JMS Client Mapping Mapping Copying Copying Header MQMD PropertiesProperties Header
  • 192. © 2010 IBM Corporation Additional Features of JMS  Message Listener  Exception Listener  Temporary Destinations  Selector – outMessage.setJMSPriority(7); – outMessage.setStringProperty(“postcode”, “SO21 2JN”); – session.createMessageConsumer(queue,“postcode LIKE ‘SO21%’ OR JMSPriority < 3”);  Queue Browser  Unidentified Producer – Destination specified on send() rather than on creation  Requestor  Application Server Facilities  XA Support
  • 193. © 2010 IBM Corporation JMS Sessions  Session / QueueSession / TopicSession  Connection.createSession(boolean transacted, int acknowledgeMode); – transacted : • true – client will issue commit/rollback calls • false – auto-commit – acknowledgeMode : • AUTO_ACKNOWLEDGE • DUPS_OK_ACKNOWLEDGE • CLIENT_ACKNOWLEDGE • (SESSION_TRANSACTED)
  • 194. © 2010 IBM Corporation LAB 9: Setting up JMS Provider  In this Lab, you will learn: – Configuring the WebSphere MQ JMS Provider using MQ Explorer • Create Connection Factory • Create JMS Destination – Test JMS application to connection to MQ Server and put message on queue – Explore JMS sample codes
  • 195. © 2010 IBM Corporation Coding in Java EE/J2EE Application  Solution Alternatives: – WebSphere MQ classes for Java Message Service (JMS) – WebSphere MQ classes for Java (WMQ base Java) – WebSphere MQ JCA resource adapter http://www-01.ibm.com/support/docview.wss?uid=swg27009524  WebSphere MQ base Java API has restrictions when being used within a J2EE/JEE environment  Check the System Requirements document! http://www-01.ibm.com/support/docview.wss?uid=swg27011920
  • 196. © 2010 IBM Corporation WebSPHERE MQ SECURITY
  • 197. © 2010 IBM Corporation  Ensure each user is uniquely identified – Identification:- Being able to uniquely identify a user of a system or an application that is running in the system.  Prove that a user is who they say they are – Authentication:- Being able to prove that a user or application is genuinely who that person or what that application claims to be.  Limit Access to authorised users only – Access Control:- Protects critical resources in a system by limiting access only to authorised users and their applications. It prevents unauthorised use of a resource or the use of a resource in an unauthorised manner.  Track who does what to what and when – Auditing:- Tracking who has done what to what and when
  • 198. © 2010 IBM Corporation  Protect your sensitive data from unauthorised viewing – Confidentiality:- Protects sensitive information from unauthorised disclosure.  Check unauthorised changes have not been made to data – Data Integrity:- Detects whether there has been unauthorsied modification of data. There are two ways in which this can occur, accidentally, through hardware or transmission errors, or by deliberate attack.  Ensure a message really is associated with whom it claims – 'Non-Repudiation':- The goal is usually to prove that a particular message is associated with a particular individual.
  • 199. © 2010 IBM Corporation Identification  Identification – O/S User IDs – Context – Link-level considerations (later) What is Context information?
  • 200. © 2010 IBM Corporation Authentication - MQCONNX  MQCSP structure in the Connection Options (MQCNO structure) – Connection Security Parameters – User ID and password  MQCSP passed to – Object Authority Manager (OAM) – Security Exit  OAM is authorization service that can use to identify and authenticate the user.  The OAM authorizes users based on the ID contained in the MQCSP but does not validate the password MQCSP csp = {MQCSP_DEFAULT}; csp.AuthenticationType = MQCSP_AUTH_USER_ID_AND_PWD; csp.CSPUserIdPtr = “hughson”; csp.CSPUserIdLength = 7; csp.CSPPasswordPtr = “12345”; csp.CSPPasswordLength = 5; MQCNO cno = {MQCNO_DEFAULT}; cno.Version = MQCNO_VERSION_5; cno.SecurityParmsPtr = &csp; MQCONNX(QMName, &cno, &hConn, &CompCode, &Reason); To implement password validation in the authorization service •by using chained exits with the OAM, •by replacing the OAM with an alternative authorization service.
  • 201. © 2010 IBM Corporation Access Control – Administering WebSphere MQ New in V7.1
  • 202. © 2010 IBM Corporation Controling Access to Object (1)  Command: setmqaut -m QMgrName -n ObjectProfile -t Type -g GroupName Action – Type: queue, topic, channel, qmgr, process, namelist, service – Action: • +chg, +clr, +crt, +dlt, +dsp. +ctrl • +alladm = +chg +clr +dlt +dsp  Showing access: – dspmqaut -m QMgrName -t qmgr -g GroupName – dspmqaut -m QMgrName -n QueueName -t q -p UserName
  • 203. © 2010 IBM Corporation Read-only access to all resource in Queue Manager  Read-only access to all resource in Queue Manager setmqaut -m QMgrName -n "**" -t queue -g GroupName +browse +dsp setmqaut -m QMgrName -n SYSTEM.ADMIN.COMMAND.QUEUE -t queue -g GroupName +dsp +inq +put setmqaut -m QMgrName -n SYSTEM.MQEXPLORER.REPLY.MODEL -t queue -g GroupName +dsp +inq +get setmqaut -m QMgrName -n "**" -t topic -g GroupName +dsp setmqaut -m QMgrName -n "**" -t channel -g GroupName +dsp setmqaut -m QMgrName -n "**" -t clntconn -g GroupName +dsp setmqaut -m QMgrName -n "**" -t authinfo -g GroupName +dsp setmqaut -m QMgrName -n "**" -t listener -g GroupName +dsp setmqaut -m QMgrName -n "**" -t namelist -g GroupName +dsp setmqaut -m QMgrName -n "**" -t process -g GroupName +dsp setmqaut -m QMgrName -n "**" -t service -g GroupName +dsp setmqaut -m QMgrName -t qmgr -g GroupName +dsp +inq +connect
  • 204. © 2010 IBM Corporation Full admin access to all resource in Queue Manager  Full admin access to all resource in Queue Manager – setmqaut -m QMgrName -n "**" -t queue -g GroupName +alladm +browse – setmqaut -m QMgrName -n @class -t queue -g GroupName +crt – setmqaut -m QMgrName -n SYSTEM.ADMIN.COMMAND.QUEUE -t queue -g GroupName +dsp +inq +put – setmqaut -m QMgrName -n SYSTEM.MQEXPLORER.REPLY.QUEUE -t queue -g GroupName +dsp +inq +get – setmqaut -m QMgrName -n "**" -t topic -g GroupName +alladm – setmqaut -m QMgrName -n @class -t topic -g GroupName +crt – setmqaut -m QMgrName -n "**" -t channel -g GroupName +alladm – setmqaut -m QMgrName -n @class -t channel -g GroupName +crt – setmqaut -m QMgrName -n "**" -t clntconn -g GroupName +alladm – setmqaut -m QMgrName -n @class -t clntconn -g GroupName +crt – setmqaut -m QMgrName -n "**" -t authinfo -g GroupName +alladm – setmqaut -m QMgrName -n @class -t authinfo -g GroupName +crt – setmqaut -m QMgrName -n "**" -t listener -g GroupName +alladm – setmqaut -m QMgrName -n @class -t listener -g GroupName +crt – setmqaut -m QMgrName -n "**" -t namelist -g GroupName +alladm – setmqaut -m QMgrName -n @class -t namelist -g GroupName +crt – setmqaut -m QMgrName -n "**" -t process -g GroupName +alladm – setmqaut -m QMgrName -n @class -t process -g GroupName +crt – setmqaut -m QMgrName -n "**" -t service -g GroupName +alladm – setmqaut -m QMgrName -n @class -t service -g GroupName +crt – setmqaut -m QMgrName -t qmgr -g GroupName +alladm +conn
  • 205. © 2010 IBM Corporation CHLAUTH rules – Default rules on new Queue Managers  Channel authentication records should be enabled • ALTER QMGR CHLAUTH(ENABLED)  Display CLHAUTH – DIS QMGR CHLAUTH – DIS CHLAUTH(*)  Default rules on new Queue Managers 1)set chlauth(‘*’) type(BLOCKUSER) USERLIST(‘*MQADMIN’) • block all users that are in the MQ admin group, from connecting to the queue manager 1)set chlauth(‘SYSTEM.*’) type(ADDRESSMAP) ADDRESS(‘*’) USERSRC(NOACCESS) • block connections to the queue manager, using any of the SYSTEM. channels that are predefined 1)set chlauth(SYSTEM.ADMIN.SVRCONN) type(ADDRESSMAP) ADDRESS(‘*’) USERSRC(CHANNEL) • allow connections to the queue manager, using SYSTEM.ADMIN.SVRCONN (MQ Explorer connections)
  • 206. © 2010 IBM Corporation Access Right to Connect to Queue Manager  Mapping a remote queue manager to an MCAUSER user ID –SET CHLAUTH('generic-channel-name') TYPE (QMGRMAP) QMNAME(generic-partner-qmgr-name) USERSRC(MAP) MCAUSER(user)  Mapping a client asserted user ID to an MCAUSER user ID –SET CHLAUTH('generic-channel-name') TYPE (USERMAP) CLNTUSER(client-user-name) USERSRC(MAP) MCAUSER(user)  Mapping an IP address to an MCAUSER user ID –SET CHLAUTH('generic-channel-name') TYPE(ADDRESSMAP) ADDRESS('generic-ip-address') USERSRC(MAP) MCAUSER(user) –Example: • SET CHLAUTH(TEST_CHANNEL) TYPE(ADDRESSMAP) ADDRESS(*) MCAUSER('mq-user') • It says the following: – For connections requesting TEST_CHANNEL... – Originating from any IP address... – Set the MCAUSER to mq-user Note: generic-channel-name = * means all channel
  • 207. © 2010 IBM Corporation  Blocking specific user IDs • SET CHLAUTH('generic-channel-name') TYPE(BLOCKUSER) USERLIST(userID1, userID2)  Blocking specific IP addresses • SET CHLAUTH('generic-channel-name') TYPE(BLOCKADDR) ADDRLIST('1.2.3.4') • SET CHLAUTH('generic-channel-name') TYPE(ADDRESSMAP) ADDRESS('1.2.3.4') USERSRC(NOACCESS)  Block all except specified IP addresses – SET CHLAUTH( '*') TYPE(ADDRESSMAP) ADDRESS( '*') USERSRC(NOACCESS) DESCR( 'Block all addresses') – SET CHLAUTH( '*') TYPE(ADDRESSMAP) ADDRESS( ‘ip-addresses') USERSRC(MAP) MCAUSER( ‘username')  Allow IP address without mapping the User ID to MCAUSER – SET CHLAUTH('*') TYPE(ADDRESSMAP) ADDRESS(‘ip-address') USERSRC(CHANNEL)  See what MCAUSER all your channels are currently running – DISPLAY CHSTATUS(chl-name) MCAUSER Note: You cannot specify MCAUSER('*').
  • 208. © 2010 IBM Corporation Auditing Distributed Platforms MQRC_NOT_AUTHORIZED events written to SYSTEM.ADMIN.QMGR.EVENT queue The event showing specifically what kind of access was attempted and different reason qualifier recorded in the event message. – MQRQ_CONN_NOT_AUTHORIZED – MQRQ_OPEN_NOT_AUTHORIZED – MQRQ_CLOSE_NOT_AUTHORIZED – MQRQ_CMD_NOT_AUTHORIZED – MQRQ_SUB_NOT_AUTHORIZED – MQRQ_SUB_DEST_NOT_AUTHORIZED
  • 209. © 2010 IBM Corporation List Connections  DISPLAY CONN(*) ALL AMQ8276: Display Connection details. CONN(AB548F5220032801) EXTCONN(414D5143514D2E544553542020202020) TYPE(CONN) PID(20964) TID(13) APPLDESC(WebSphere MQ Channel) APPLTAG(MQ Explorer 7.5.0) APPLTYPE(SYSTEM) ASTATE(STARTED) CHANNEL(SVRCONN.MQOPR) CONNAME(127.0.0.1) CONNOPTS(MQCNO_HANDLE_SHARE_BLOCK,MQCNO_SHARED_BINDING) USERID(mqopr) UOWLOG( ) UOWSTDA( ) UOWSTTI( ) UOWLOGDA( ) UOWLOGTI( ) URTYPE(QMGR) EXTURID(XA_FORMATID[] XA_GTRID[] XA_BQUAL[]) QMURID(0.0) UOWSTATE(NONE)
  • 210. © 2010 IBM Corporation Problem Determination & Troubleshooting
  • 211. © 2010 IBM Corporation Questions when problem occurs  Has WebSphere MQ run successfully before?  Are there any error messages?  Does the Windows Application Event Log show any WebSphere MQ errors? (Windows only)  Are there any return codes explaining the problem?  Can you reproduce the problem?  Have any changes been made since the last successful run?  Has the application run successfully before?
  • 212. © 2010 IBM Corporation Troubleshooting  Check the channel – View channel status: DIS CHS(*) STATUS • “AMQ8420: Channel Status not found” may resulted long interval of inactivity. The receiver channel status will not be displayed until the channel is started on the sending side. – Find channel in-doubt status: DIS CHS(*) INDOUBT • In-doubt status (and the units of work involved) are resolved automatically between MCAs when a channel is restarted. • Resolve manually: RESOLVE CHANNEL(CHNAME) ACTION(COMMIT | BACKOUT ) RESET CHANNEL – Find out more: DIS CHS(*) SUBSTATE
  • 213. © 2010 IBM Corporation Troubleshooting DLQ  When messages are placed onto the Dead Letter Queue (such as SYSTEM.DEAD.LETTER.QUEUE), a special header is attached to the message giving information on why the message has been put onto the queue (reason code).  Troubleshoot using command: amqsbcg DLQ QM1 > amqsbcg.txt Location: – WMQ_INSTALL_DIRtoolscSamplesBin (Windows) – /opt/mqm/samp/bin (UNIX)
  • 214. © 2010 IBM Corporation Troubleshooting DLQ • 5th and 6th pairs from the Left is Reason Code.
  • 215. © 2010 IBM Corporation Troubleshooting DLQ • Use mqrc command to know the Reason Code, can use hexadecimal or decimal • For Unix (except for Linux on x86 – Intel): mqrc 0x000007F3 • For Linux or Windows on x86 the Reason Code is in little-endian format (low-order bytes first). Example: 0A01 0000  0000 010A  266 in decimal Command: mqrc 266 • Example result: • 2085 0x00000825 MQRC_UNKNOWN_OBJECT_NAME • 2035 0x000007f3 MQRC_NOT_AUTHORIZED • It is far easier to find out the reason code by browsing a message from the DLQ via MQ Explorer. It handles the swapping of bytes according to platform. • You can do reverse lookup via mqrc: mqrc MQRC_UNKNOWN_OBJECT_NAME
  • 216. © 2010 IBM Corporation Error Log  Error log locatoin: – /var/mqm/errors – /var/mqm/qmgrs/<queueManagerName>/errors – /var/mqm/qmgrs/@SYSTEM/errors (not used at V6 and higher)  Error log files: AMQERR01.LOG, AMQERR02.LOG and AMQERR03.LOG  Find FFST record in FDC file: AMQnnnnnnnn_mm.FDC nnnnnnnn Is the process id reporting the error  Run command: ffstsummary
  • 217. © 2010 IBM Corporation Killing queue managers process  The first process to end is amqzmuc0 – the critical process manager. This contains the logger, and ending it prevents any further transactional work.  The next process to end is amqzxma0 – the execution controller. The execution controller identifies when other processes die. Stopping this prevents it from producing a pile of “Process X has died” FFST error reports as they are ended. It also prevents any new connections being made to the queue manager.  At the other end of the list is amqpcsea – the command server. By this point in the list, these are processes which do not access any critical queue manager resources, so can be safely left until last.
  • 218. © 2010 IBM Corporation Checking OS resource  Use mqconfig script to know how to tune the operating system, including user limits and kernel parameters for resources like shared memory and semaphores.  http://www-01.ibm.com/support/docview.wss?uid=swg21271236#mqconfig
  • 219. © 2010 IBM Corporation Escalate problem to IBM Support – Creating PMR  Make sure you know your IBM Customer Number  Call IBM WebSphere Support (http://www.ibm.com/planetwide/id/) Tel: +62-21- 2992 5555 Tel: 1-803-422-291 – Customer name, IBM Customer number – Software name and version & fix pack level – OS version & fix pack level – Brief description of the problem – Severity of the problem: 1 is the highest (need 24 hours contactable number)  You will get PMR number and IBM Support engineer will contact you via email/phone
  • 220. © 2010 IBM Corporation Collect MustGather  http://www-01.ibm.com/support/docview.wss?uid=swg21229861  Collect IBM MQ MustGather data when you first open a problem record so you can provide IBM support the information they need to investigate the problem. Start by selecting the category which best matches the problem on your system:
  • 221. © 2010 IBM Corporation What next?
  • 222. © 2010 IBM Corporation SupportPac MA46: WebSphere MQ Java client for iSeries V7.0 MA6O: WebSphere MQ - UNIX Administration Tool MH04: WebSphere MQ - Queue Statistics Tool MQC7: WebSphere MQ V7.0 Clients MA96: WebSphere MQ - Message Browser MS0T: WebSphere MQ Explorer MS0Q: WebSphere MQ Explorer Publish/Subscribe plug-in MS0S: WebSphere MQ Explorer MQSC Editor Plug-in MS0P: WebSphere MQ Explorer - Configuration and Display Extension Plug-ins MO71: WebSphere MQ for Windows GUI Administrator MSL1: WebSphere MQ for Linux - Automatic Startup MS0P: WebSphere MQ Explorer - Configuration and Display Extension Plug-ins MA0T: WebSphere MQ - Message Test Utility MA0Y: WebSphere MQ Bridge for HTTP http://www-01.ibm.com/support/docview.wss?uid=swg27007197#1 Check SupportPacs web page to find tools/document that might help you.
  • 223. © 2010 IBM Corporation Cat2 ME02: Search Plug-in
  • 224. © 2010 IBM Corporation Cat2 MS0P: Events and Stats Plug-in Now with Command Events!
  • 225. © 2010 IBM Corporation Cat2 MS0P: Using Trace-route
  • 226. © 2010 IBM Corporation Cat3 IS02: Message Broker Admin Plug-in
  • 227. © 2010 IBM Corporation Multi-instance queue managers: How it looks  As a graphical example, SupportPac MS0P V7.0.1
  • 228. © 2010 IBM Corporation HTTP Connectivity to WMQ  Easy access to MQ resources from any device with an HTTP interface  Extends the scope beyond traditional systems  Alternative implementation as SupportPac MA94 MQ HTTP Bridge MQ JCA + JMS http://mq.com:1415/msg/ queues/myQ topics/stocks/IBM HTTP: POST / GET / DELETE libwww Web Browsers Javascript AJAX HTTP clients JEE Application Server Java SVRCONN CHANNEL MQ Bindings Connection MQ JMS client connection Queue Manager
  • 229. © 2010 IBM Corporation Learning Resource
  • 230. © 2010 IBM Corporation developerWorks
  • 231. © 2010 IBM Corporation InfoCenter: WebSphere MQ Documentation http://publib.boulder.ibm.com/infocenter/wmqv7/v7r1/index.jsp?topic=%2Fcom.ibm.mq.doc%2Fzl00000_.htm

Notes de l'éditeur

  1. Key Takeaways: This chart is self-explanatory.
  2. Note that the graphic does NOT depict to scale the relationship of Message headers and Properties to the message body (which can be up to 100MB)
  3. Messages written to DASD datasets - queue contents are safe (persistent). Movement of messages logged on separate DASD. Messages that have been written (MQPUT) by an application will never be lost or discarded messages destined for a local queue are written synchronously to the queue. Messages destined to remote queue are written to a local intermediate queue (transmission queue). Messages sent by a connected queue manager that cannot be delivered to the target queue are written to the dead letter queue.
  4. No direct connections between programs Message queuing is a technique for indirect program-to-program communication. It can be used within any application where programs communicate with each other. Communication occurs by one program putting messages on a queue (owned by a queue manager) and another program getting the messages from the queue. Programs can get messages that were put on a queue by other programs. The other programs can be connected to the same queue manager as the receiving program, or to another queue manager. This other queue manager might be on another system, a different computer system, or even within a different business or enterprise. There are no physical connections between programs that communicate using message queues. A program sends messages to a queue owned by a queue manager, and another program retrieves messages from the queue (see Figure 1). Figure 1. Message queuing compared with traditional communication As with electronic mail, the individual messages that are part of a transaction travel through a network on a store-and-forward basis. If a link between nodes fails, the message is kept until the link is restored, or the operator or program redirects the message. The mechanism by which a message moves from queue to queue is hidden from the programs. Therefore the programs are simpler. Time-independent communication Programs requesting others to do work do not have to wait for the reply to a request. They can do other work, and process the reply either when it arrives or at a later time. When writing a messaging application, you need not know (or be concerned) when a program sends a message, or when the target is able to receive the message. The message is not lost; it is retained by the queue manager until the target is ready to process it. The message stays on the queue until it is removed by a program. Small programs Message queuing allows you to exploit the advantages of using small, self-contained programs. Instead of a single, large program performing all the parts of a job sequentially, you can spread the job over several smaller, independent programs. The requesting program sends messages to each of the separate programs, asking them to perform their function; when each program is complete, the results are sent back as one or more messages. Event-driven processing Programs can be controlled according to the state of queues. For example, you can arrange for a program to start as soon as a message arrives on a queue, or you can specify that the program does not start until there are, for example, 10 messages above a certain priority on the queue, or 10 messages of any priority on the queue. Message priority A program can assign a priority to a message when it puts the message on a queue. This determines the position in the queue at which the new message is added. Programs can get messages from a queue either in the order in which the messages appear in the queue, or by getting a specific message. (A program might want to get a specific message if it is looking for the reply to a request that it sent earlier.) Security Authorization checks are carried out on each resource, using the tables that are set up and maintained by the WebSphere® MQ administrator. Use Security Server (formerly known as RACF®) or other external security managers on WebSphere MQ for z/OS®. On WebSphere MQ on UNIX systems, Windows systems, and i5/OS®, a security manager called the Object Authority Manager (OAM) is provided as an installable service. By default, the OAM is active. Data integrity Data integrity is provided by units of work. The synchronization of the start and end of units of work is fully supported as an option on each MQGET or MQPUT, allowing the results of the unit of work to be committed or rolled back. Sync point support operates either internally or externally to WebSphere MQ depending on the form of sync point coordination selected for the application. Recovery support For recovery to be possible, all persistent WebSphere MQ updates are logged. In the event that recovery is necessary, all persistent messages are restored, all in-flight transactions are rolled back, and any sync point commit and backouts are handled in the normal way of the sync point manager in control. For more information on persistent messages, see Message persistence.
  5. Program A and B communicate locally via Q1 – no channels involved. Program A and C communicate remotely via Q2 – channels involved, using an XmitQ. The XmitQ allows Program A to operate as though Q2 were local (because the XmitQ is in fact local). So neither program need have any awareness of the queue manager topology or the underlying network details.
  6. Real life example: Mortgage Loan Request -Verification of Employment - Credit Report - Bank Balance Inquiry
  7. Final Mortgage Approval - All results are in (one logical unit) - E compiles the results and reports them
  8. On Linux/UNIX, sample programs are in QMA MQ_INSTALLATION_PATH/samp/bin directory
  9. On Linux/UNIX, sample programs are in QMA MQ_INSTALLATION_PATH/samp/bin directory
  10. An application uses the MQCONN call to connect to a queue manager. The application then uses the MQOPEN call to open a queue so that it can put messages on it. A queue manager has a definition for each of its queues, specifying information such as the maximum number of messages allowed on the queue. If the messages are destined for a queue on a remote system, the local queue manager holds them in a message store until it is ready to forward them to the remote queue manager. This can be transparent to the application. Each queue manager contains communications software called the moving service component; through this, the queue manager can communicate with other queue managers. The transport service is independent of the queue manager and can be any one of the following (depending on the platform): Systems Network Architecture Advanced Program-to Program Communication (SNA APPC) Transmission Control Protocol/Internet Protocol (TCP/IP) Network Basic Input/Output System (NetBIOS) Sequenced Packet Exchange (SPX)
  11. Panah Message Flow nya salah???
  12. When a message arrives on a transmission queue that satisfies the triggering criteria for that queue, a message is sent to the initiation queue, triggering the channel initiator to start the appropriate sender channel. -&amp;gt; channels can be started automatically, based upon messages arriving on the appropriate transmission queue The channel listener detects incoming network requests and starts the associated channel (Responder MCA)
  13. CLUSTER contains three queue managers, QM1, QM2, and QM3. QM1 and QM2 host full repositories of information about the queue managers and queues in the cluster. QM2 and QM3 host some cluster queues, that is, queues that are accessible to any other queue manager in the cluster. Each queue manager has a cluster-receiver channel called TO.qmgr on which it can receive messages. Each queue manager also has a cluster-sender channel on which it can send information to one of the repository queue managers. QM1 and QM3 send to the repository at QM2 and QM2 sends to the repository at QM1. As with distributed queuing, you use the MQPUT call to put a message to a queue at any queue manager. You use the MQGET call to retrieve messages from a local queue.
  14. The sequence of processing is as follows: The security exits are called after the initial data negotiation between both ends of the channel. These must end successfully for the startup phase to complete and to allow messages to be transferred. The message exit is called by the sending MCA, and then the send exit is called for each part of the message that is transmitted to the receiving MCA. The receiving MCA calls the receive exit when it receives each part of the message, and then calls the message exit when the whole message has been received.
  15. There are times when you need alternative channels, perhaps for security purposes, or to trade off delivery speed against sheer bulk of message traffic
  16. Any queue manager can send a message to any other queue manager in the same cluster without explicit channel definitions, remote-queue definitions, or transmission queues for each destination. Every queue manager in a cluster has a single transmission queue from which it can transmit messages to any other queue manager in the cluster. Each queue manager in a cluster needs to define only: One cluster-receiver channel on which to receive messages One cluster-sender channel with which it introduces itself and learns about the cluster
  17. http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.con.doc/q015720_.htm Transmission queues are transparent to the application. They are used internally by the queue manager Sebaiknya memang aplikasi tidak mengambil data dari XMIT queue. Jadi cara handle yang benar jika message tidak bisa dikirimkan ke remote queue dalam waktu tertentu dan kita akan lakukan sesuatu terhadap message tersebut (dalam hal ini dijadikan file text) adalah dengan cara .Pada saat membuat channel dispesifikasikan berapa kali MQ (MCA) akan retry mengirimkan message dan berapa lama akan menunggu untuk dikirim. Jika MCA melakukan retry sampai maksimum atau intervalnya sudah tercapai maka message akan dikirim ke dead-letter-queue atau dimasukan ke queue tertentu dispesifikasikan di header message.Ini attribute konfigurasi channel (hanya ada di receiver channel) tersebut: * Message retry count (MRRTY) * Message retry interval (MRTMR) .Saran saya pada saat PUT message, dispesifikasikan message descriptor MQRO_EXCEPTION_WITH_FULL_DATA dan MQRO_DISCARD_MSG agar jika gagal dikirim dikirim ke queue tertentu. Perlu dispesifikasikan juga nama reply-to queue dan reply-to queue manager Berikut contoh program Java saat put, untuk C# tidak beda jauhMQMessage qMessage = new MQMessage();qMessage.format = MQC.MQFMT_STRING;qMessage.messageType = MQC.MQMT_REQUEST;qMessage.characterSet = 850;qMessage.replyToQueueName = &amp;quot;QUEUE_TEST&amp;quot;;qMessage.replyToQueueManagerName = &amp;quot;QM_TEST&amp;quot;;qMessage.report = MQC.MQRO_EXCEPTION_WITH_FULL_DATA + MQC.MQRO_DISCARD_MSG; .Lalu buat program untuk GET message dari reply-to queue tersebut.
  18. A WebSphere MQ client application and a server queue manager communicate with each other by using an MQI channel. An MQI channel starts when the client application issues an MQCONN or MQCONNX call to connect to the queue manager ends when the client application issues an MQDISC call to disconnect from the queue manager. The input parameters of an MQI call flow in one direction on an MQI channel and the output parameters flow in the opposite direction. WMQ V7 Clients http://www-01.ibm.com/support/docview.wss?uid=swg24019253
  19. Notes: 1. Synchronous messaging only. 2. Only for Queues owned by the Server it is immediately connected to. 3. Requires an external transaction manager. 4. WebSphere MQ for z/OS servers require an additional Client Attachment license for MQ clients to connect into it. This also applies when connecting the new WebSphere MQ V6.0 MQ Explorer tooling into WebSphere MQ for zOS V6.0 deployments since it uses client channels – although there is no longer a need to install a client on machines running this release of MQ Explorer.
  20. http://www-01.ibm.com/software/websphere/subscriptionandsupport/compare-mq-versions.html
  21. Create a queue manager, called QM1 for example: crtmqm QM1 Start the queue manager: strmqm QM1 Start MQSC commands: runmqsc QM1
  22. This feature is not available on z/OS
  23. WebSphere MQ MQI clients can be configured to look up a repository to obtain connection definitions using a pre-connect exit library. A client application can connect to a queue manager using a client channel definition table (CCDT). Generally, the CCDT file is located on a central network file server, and have clients referencing it. Since it is difficult to manage and administer various client applications referencing the CCDT file, a flexible approach is to store the client definitions in a global repository like an LDAP directory, a WebSphere Registry and Repository or any other repository. Storing the client connection definitions in a repository makes managing client connection definitions easier, and applications can access the correct and most current client connection definitions. During the MQCONN/X call execution, the MQI client loads an application specified preconnect exit library, and invokes an exit function to retrieve connection definitions. These are then used to establish connection to a queue manager. The details of exit library and function to invoke are specified in the mqclient.ini configuration file.
  24. Emphasize that Client Channel Definition Tables are used in all but the simplest of cases. They are created by an administrator when client channels are defined, and allow connect options to be specified administratively as opposed to options that can be overridden by the developer (using MQCONNX) or the end user (using the MQSERVER environment variable). In addition, there are channel definition options available that can ONLY be set using a CCDT. A CCDT is somewhat analogous to a Connection Factory with JMS or XMS. In fact, a JMS or XMS Connection Factory can reference a CCDT, the two working together.
  25. Some of the reasons for choosing to use a Queue Manager Group are: To connect a client to any one of a set of queue managers that is running, to improve availability. To reconnect a client to the same queue manager it connected to successfully last time, but connect to a different queue manager if the connection fails. To automatically reconnect a client connection to another queue manager if the connection fails, without writing any client code. To automatically reconnect a client connection to a different instance of a multi-instance queue manager if a standby instance takes over, without writing any client code. To balance your client connections across a number of queue managers, with more clients connecting to some queue managers than others. To spread the reconnection of many client connections over multiple queue managers and over time, in case the high volume of connections causes a failure. To be able to move your queue managers without changing any client application code. To write client application programs that do not need to know queue manager names.
  26. In this example the user has defined two client channels. The client searches through the client channels in alphabetical channel name order. It looks for a channel definition with a QMNAME field which matches what the application specified on the MQCONN call. We therefore find channel ‘chl2’. If we did not find any channel definitions which match the application would receive a 2058 (Queue Manager name error) reason code. The transmission protocol and associated connection are extracted from the channel definition and an attempt is made to start the channel to the machine identified (venus). In order for the connection to be successful clearly there must be started listener at the remote machine and the queue manager itself must be started. If the connection can not be established then a 2059 (Queue Manager not available) reason code is returned to the application. If you believe the Queue Manager is running then look in the client error log for an error message explaining the reason for the failure. The error log is in &amp;lt;mq install path&amp;gt;\errors\AMQERR01.LOG
  27. In this example there are three channels, that all connect to the same queue manager using different connections (ethernet, tokenring and dialup). This provides a level of redundancy. The client has to pick one, but which one? The client attempts to start channel &amp;apos;chl2&amp;apos; (since the search is in alphabetical channel name order); its QMNAME attribute matches the name in the MQCONN. However the communication link is currently broken. Channel &amp;apos;chl3&amp;apos; is now started instead because QMNAME still matches what was specified on the MQCONN call. So the client is connected to queue manager “venus&amp;quot; but via ethernet.
  28. In this example the client tries to connect to a queue manager first using &amp;quot;chl1&amp;quot; but the communication link is down. Secondly it tries &amp;quot;chl2&amp;quot; but the queue manager is not currently running. Finally the client tries to connect using channel &amp;quot;chl5&amp;quot;. The communications link is running and the queue manager is running. However, the name of the queue manager &amp;quot;pluto&amp;quot; does not match the one specified on the MQCONN call “planet”. What we need is a way to tell MQ that we, the application, don’t really care what the actual Queue Manager name is. We can do that by specifying &amp;quot;*planet“ rather than just “planet”. The * specifies that the client does not care if the actual name of the Queue Manager does not match the name given.
  29. When using a client channel definition table (CCDT) to configure the client connectivity used by your client applications, you can provide a number of destination queue managers to choose from in order to provide redundancy and alternate destinations when one fails. You can define these destinations with a weighting so that the spread of client connections between the group of queue managers is as you require. You can then use the same CCDT with all your clients – no need to produce different copies of the CCDT to spread out your client connections across all the back-end servers. The default value of CLNTWGHT is 0 – which retains the V6 behaviour of primary then secondary choices chosen by alphabetical order. By default client channels have AFFINITY(PREFERED) set. This means that any particular client application will attempt to connect to the same queue manager each time. This is the same behaviour that was available in V6 with the mechanism that the primary connection was attempted first, then if it was not available, the secondary connection was attempted, and so on. If it is desired that connections from the same machine are to be workload balanced as above, AFFINITY(NONE) can be chosen.
  30. ShareConv Multiplex channel setting Shareconv default is 10 but can be set server side 0 - Multiplexing and all v7 dependent functionality disabled (i.e async consumer) 1 - Multiplexing disabled but all v7 functionality enabled &amp;gt;1 - Multiplexing and v7 functionality enabled BE SURE TO STRESS THAT THE FOLLOWING SLIDES THAT COVER PERFORMANCE REQUIRE AT LEAST SHARECNV(1)!!!!! For JMS clients, the client side controls negotiating position using JMS Connection Factory Property &amp;quot;XMSC_WMQ_SHARE_CONV_ALLOWED&amp;quot; WMQ_SHARE_CONV_ALLOWED_YES will accept any positive value (i.e. &amp;gt; 0) WMQ_SHARE_CONV_ALLOWED_NO will only accept a ShareConv value of 1. Setting ShareConv to 0 can only be supported using the v6 leg. IP Sprayers Connections to v6 Queue Managers may take two attempts Tolerant to second attempt not being to the same Queue Manager
  31. Read Ahead represents a recognition of the fact that a large proportion of the cost of an MQGET from a client is the line turnaround of the network connection. When using Read Ahead the MQ client code makes a request for more than one message from the server. The server will send as many non-persistent messages matching the criteria (such as MsgId) as it can up to the limit set by the client. The largest speed benefit will be seen where there are a number of similar non-persistent messages to be delivered and where the network is slow. Read Ahead is useful for applications which want to get large numbers of non-persistent messages, outside of syncpoint where they are not changing the selection criteria on a regular basis. For example, getting responses from a command server or a query such as a list of airline flights. If an application requests read ahead but the messages are not suitable, for example, they are all persistent then only one message will be sent to the client at any one time. Read ahead is effectively turned off until a sequence of non-persistent messages are on the queue again. The message buffer is purely an &amp;apos;in memory&amp;apos; queue of messages. If the application ends or the machine crashes these messages will be lost. Because this mechanism is designed to remove the network delay it currently only has a benefit on client applications. However, it is recommended that applications that might benefit from it, use it for local bindings as well since in the future there is the possibility that the server could perform some optimisations when this option is used. A benefit here is that when a client application issues an MQGET(WAIT) there is not a thread on the server which is sitting in an MQGET(WAIT). In fact, there need be no thread directly related to an individual client connection any more.
  32. Asynchronous Put (also known as &amp;apos;Fire and Forget&amp;apos;) is a recognition of the fact that a large proportion of the cost of an MQPUT from a client is the line turnaround of the network connection. When using Asyncronous Put the application sends the message to the server but does not wait for a response. Instead it returns immediately to the application. The application is then free to issue further MQI calls as required. The largest speed benefit will be seen where the application issues a number of MQPUT calls and where the network is slow. Asynchronous put can be requested via the MQPMO_ASYNC_RESPONSE put option or administratively via the DEFPRESP queue attribute. Once the application has competed it&amp;apos;s put sequence it will issue MQCMIT or MQDISC etc which will flush out any MQPUT calls which have not yet completed. Because the client does not wait for a response from the MQPUT call it will not be told at MQPUT time whether there was a problem putting the message. For example, the queue could be full. There are three things the application can do : Ignore the situation In many cases of say a non-persistent message the application does not care too much whether the message makes it or not. If no response is received then another request can be issued within a few seconds or whatever. Issue an MQCMIT If the messages put are persistent messages in syncpoint then if any of them fail they will cause a subsequent MQCMIT call to also fail. Issue a new verb MQSTAT This new verb allows the application at any time to flush all messages to the server and respond with how many of the messages succeeded or failed. Because this mechanism is designed to remove the network delay it currently only has a benefit on client applications. However, it is recommended that applications use it for local bindings as well since in the future there is the possibility that the server could perform some optimizations when this option is used.
  33. The Secure Sockets Layer (SSL) provides an industry standard protocol for transmitting data in a secure manner over an insecure network. The SSL protocol is widely deployed in both Internet and Intranet applications. SSL defines methods for authentication, data encryption, and message integrity for a reliable transport protocol, usually TCP/IP. SSL can be enabled on client channels by specifying a CipherSpec on the client and server connection channel definitions. SSL cannot be used if using the MQSERVER environment variable. If using the MQCNO structure to pass in the client channel on an MQCONNX call, a CipherSpec can be set in the MQCD structure. If using Active Directory on Windows you can use the setmqcsp control command to publish the client-connection channel definitions in Active Directory. One or more of these definitions can specify the name of a CipherSpec.
  34. In contrast the other “sibling” is point to point messaging. In the same way it is not the message content that makes an application point to point or Pub / sub, it is the infrastructure that handles the message.
  35. Again the infrastructure is what is pub/sub Over 10,000 magazines in the US, Publishers use the magazine title and advertising to indicate the contents. We readers select which magazine to pick up based on that information.
  36. A topic tree is an internal representation of the topic hierarchy – is references using the Topic string. The tree has a root node at the very top. This is described using an MQ-defined base topic object (topic objects will be discussed on the next slide). The shape of the topic tree is implied from the complete set of topic strings in use - either defined (as topic objects), published to, subscribed to. There is not necessarily a one-to-one mapping between topic objects and nodes in the tree. This will become clear as we move to the next slide and discuss exactly what we mean by topic objects.
  37. Notes: Instructor notes: Purpose — Details — Additional information — Transition statement —
  38. Notes: Instructor notes: Purpose — Details — Additional information — Transition statement —
  39. Use DISPLAY TPSTATUS to display the status of one or more topic nodes in a topic tree. The value of TPSTATUS determines which topic nodes are returned on the call to DISPLAY TPSTATUS. The TPSTATUS attribute requires a topic string value. This value may be one of the following: A specific topic string value, e.g. DIS TPS(‘Sports/Football’) – returns just the ‘Sports/Football’ node A topic string containing a ‘+’ wildcard, e.g. DIS TPS(‘Sports/Football/+’) – returns all immediate children of the ‘Sports/Football’ node A topic string containing a ‘#’ wildcard, e.g. DIS TPS(‘Sports/Football/#’) – returns all descendants of ‘Sports/Football’ in the topic tree, plus the ‘Sports/Football’ node itself A topic string containing multiple wildcards, e.g. DIS TPS(‘Sports/+/teams/#’) – returns any immediate child of ‘Sports’ which has a child of ‘teams’, plus the all descendants of that node Note that the use of wildcards should follow the rules as laid out in INSERT REFERENCE TO BOOK CONTAINING INFO ON HOW WILDCARD CHARS WORK AS IN 99966. An asterisk is not a supported wildcard for the TPSTATUS attribute. To return a list of all root-level topics, use DIS TPS(‘+’) To return a list of all topics in the topic tree (depending on your configuration, this may return a large volume of data), use DIS TPS(‘#’) The list of topics that is returned may be further modified by the use of a filter on TOPICSTR, e.g. DIS TPS(‘Sports/Football/+’) WHERE(TOPICSTR LK ‘Sports/Football/L*’) will return all immediate child nodes of the node ‘Sports/Football/’, which begin with the letter ‘L’.
  40. Review objectives for Lab 3. The purpose of this lab is to show an example of
  41. Key Points: There is nothing else quite like MQ in the Market today. It is the market leader in Message Oriented Middleware. It is The Universal Communicator MQ’s key strength is its breadth: With a whole range of programming languages – including Java, C/C++, C#, .NET, COBOL,… A wide range of Interfaces from MQI to JMS, XMS and .Net. Other interfaces that can be used are to HTTP &amp; FTP This support means that applications can be connected without modification Also virtually any IT commercial platform – including native z/OS is supported. This means your customers can integrate anything they have and use the skills they already have… So lets now look a bit more closely at HTP ….
  42. MQOO_INPUT_SHARE MQOO_INPUT_EXCLUSIVE MQRC_OBJECT_IN_USE
  43. Within a unit of work, changes to resources are atomic. That is, either all of them take place and are committed, or none of them take place. There are no in-between states. In the event of failure during a unit of work, or if the application determines that it cannot complete the unit of work for any reason, changes to resources that have already been made are backed out, or rolled back. The point at which changes to the resources within a unit of work are committed or backed out is known as a point of synchronization, or more simply a syncpoint. At a syncpoint, the data within the resources is in a consistent state from the point of view of the business and its applications. The visual shows changes to queues and a database, but other resources such as files and working storage might also be affected.
  44. The current depth reflects these messages but any attempt to use MQGET to retrieve them fails with MQRC_NO_MSG_AVAILABLE
  45. Supported by env: - UNIX and Linux systems - Windows systems
  46. First TriggerMsgPriority Every TriggerMsgPriority Depth TriggerDepth TriggerMsgPriority
  47. MQTM, MQTMC and MQTMC2 contain the fields displayed above. MQTM defines the version and ApplType fields as MQLONG, while the MQTMC defines those felds as characters. MQTMC2 is the same definition as MQTMC, though the version value is 2 and there is one additional field, QMgrName
  48. The COBOL copy files (containing the named constants and structure definitions) located in QMQM/QCBLLESRC
  49. http://www.ibm.com/developerworks/websphere/techjournal/1003_mismes/1003_mismes.html Reference:
  50. Command on slide is from Infocenter This is from MQ Explorer Windows: Rem These commands give group &amp;apos;mqopr&amp;apos; read only access on WebSphere MQ for Windows. setmqaut -m QM.TEST -t qmgr -g mqopr +connect +inq +dsp setmqaut -m QM.TEST -n &amp;quot;**&amp;quot; -t q -g mqopr +dsp +browse setmqaut -m QM.TEST -n &amp;quot;**&amp;quot; -t topic -g mqopr +dsp setmqaut -m QM.TEST -n &amp;quot;**&amp;quot; -t channel -g mqopr +dsp setmqaut -m QM.TEST -n &amp;quot;**&amp;quot; -t process -g mqopr +dsp setmqaut -m QM.TEST -n &amp;quot;**&amp;quot; -t namelist -g mqopr +dsp setmqaut -m QM.TEST -n &amp;quot;**&amp;quot; -t authinfo -g mqopr +dsp setmqaut -m QM.TEST -n &amp;quot;**&amp;quot; -t clntconn -g mqopr +dsp setmqaut -m QM.TEST -n &amp;quot;**&amp;quot; -t listener -g mqopr +dsp setmqaut -m QM.TEST -n &amp;quot;**&amp;quot; -t service -g mqopr +dsp setmqaut -m QM.TEST -n &amp;quot;**&amp;quot; -t comminfo -g mqopr +dsp Rem The following commands provide administrative access for MQ Explorer. setmqaut -m QM.TEST -n SYSTEM.MQEXPLORER.REPLY.MODEL -t q -g mqopr +dsp +inq +get setmqaut -m QM.TEST -n SYSTEM.ADMIN.COMMAND.QUEUE -t q -g mqopr +dsp +inq +put
  51. FFST = First Failure Support Technology Each file size of AMQERR0X.LOG is 256KB, can be change in ini file, e.g. “QMErrorLog: ErrorLogSize=1048576” for 1MB http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_7.1.0/com.ibm.mq.doc/ia12420_.htm?lang=en