SlideShare a Scribd company logo
1 of 103
Download to read offline
Fundamentals of Websphere MQ Series
Agenda 
Websphere MQ Introduction 
Websphere MQ Objects 
Websphere MQ Administration Basics 
Hands-on part 1 
Distributed MQ 
Websphere MQ Clusters 
Hands-on part 2 
Websphere MQ Programming Basics 
Hands-on part 3
Introduction
Messaging and Queuing 
Telephone answering machine 
Punched Cards and processing 
Clerical Data Input and processing 
Information Management Systems (IMS) 
Customer Information Control System (CICS) 
Telecommunications Access Methods (TCAM) 
Virtual Telecommunications Access Method
Messaging and Queuing 
Messaging is 
an availability adaptation technique used for the transfer of information between two entities without regard for the immediate availability and accessibility of either 
Queuing 
a time adaptation technique user for saving information until the intended message receiver is ready to receive it 
Messaging and queuing is both asynchronous and connection less 
Note: entities can be program, persons, systems etc
Requirements 
Distributed applications and systems 
Increase in program to program communication 
Heterogeneous Platforms 
Multiple communication protocols 
Maximize resource utilization 
Development complexity and resource skill set
Websphere MQ (MQ Series until '02) 
IBM middleware for messaging & queuing 
Launched on MVS/ESA in 1992 
Currently available on all major platforms 
Windows 
UNIX (AIXLinuxSun Solaris, HP-UX) 
AS/400 
Z/OS 
Common API (MQI) on all platforms 
Supports multiple programming languages 
C, C++, JAVA, VB, COBOL,PL/1,Assembler 
Supports JMS standard APIs for messaging
MQ Objects
MQ Message 
String of bytes meaningful to the entity using it. 
Two parts to MQ messages 
Application Data 
Content and structure defined and understood by the application program 
Message Descriptor 
Contains control information like type of message and priority which are understood and used by MQ 
Default length is 4 MB; the max length is 100 MB 
Length can be restricted by the definition of MQ objects and the system storage 
Messages can be segmented or grouped
MQ Messages 
Message Types (Functional) 
Datagram 
Request 
Reply 
Report 
Message Retention Types 
Persistent 
Non-persistent
MQ Message Descriptor 
Version 
Message ID/Correlation ID 
Persistent/Non persistent 
Priority 
Date and time 
Life time of a message 
Coded Character Set Id 
Format 
Sender application and type 
Report options/Feedback 
Back out counter 
Segmentation/Grouping information
MQ Object Types 
Queue manager 
Queue 
Process Definitions 
Channels 
Name lists 
System Default Objects 
Clusters 
Authentication Information Objects
MQ Object Names 
Up to 48 characters for all objects except channels 
Up to 20 characters for channels 
Uppercase A- Z 
Lowercase a - z 
Numerics 0 - 9 
Period (.) 
Underscore (_) 
Forward slash (/)* 
Percent sign (%)* 
Blanks are not allowed 
* - If used, names should be enclosed in double quotes since these are special characters
Managing MQ Objects 
Control commands typed in through key board. 
MQSC commands through key board or from files 
Programmable Command Format (PCF) Messages 
MQ Administration Interface (MQAI) call from a program 
MQ Explorer snap-in and MQ services snap-in running under Microsoft management Console* 
* - Applicable to Windows platform only
Message Queue Manager (MQM) 
Manages queues of messages for applications 
Provides application programming interface MQI 
Uses existing network facilities to transfer messages 
Coordinates database and queue data updates 
Segments messages and assembles them 
Allows message grouping and disassembling 
Can send message to more than one destination 
Provides administrative functions on objects 
Special events like triggers and instrumentation events are generated
MQ Queues 
For Applications 
Local Queues 
Remote Queues 
Alias Queues 
Model Queues 
Dynamic Queues 
Used by MQ 
Initiation Queues 
Transmission Queues 
Cluster Transmission Queues 
Dead-letter Queues 
Command Queues 
Reply-to queues 
Event Queues
Process definition 
Defines an application that starts in response to a trigger 
Attributes include application type, application ID (path) and data specific to the application
Channels 
Logical communication link 
Communication path from one MQM to another 
Used to move messages between MQMs 
Shields applications from underlying protocols 
Message Channels connects two MQMs 
Uses Message Channel Agents (MCA) 
Unidirectional 
Requires a sender, receiver channels and a protocol 
MQI Channels connects MQ client to server 
Bidirectional 
Used for MQ calls and responses only
Namelist 
Contains a list of MQ objects; queue, cluster, authinfo 
Typically used by trigger monitors to identify a group of queues 
Used in clustered environment to inform the availability of an MQ object to clusters 
Maintained independent of application and can be modified without stopping it 
Multiple applications can use a Namelist
MQ Overview1
MQ Overview 
MQ Client 
Application MQPUT 
MQI Channel 
MQ Server (MQM1) 
MQI 
Channel 
Sender Channel 
Remote Q 
MQ Server (MQM2) 
Receiver Channel 
Local Q
Putting Together1
System Default Objects 
Object Name Description 
SYSTEM.ADMIN.CHANNEL.EVENT Event queue for channels 
SYSTEM.ADMIN.COMMAND.QUEUE Administration command queue. Used for remote MQSC commands and PCF commands. 
SYSTEM.ADMIN.PERFM.EVENT Event queue for performance events 
SYSTEM.ADMIN.QMGR.EVENT Event queue for queue manager events 
SYSTEM.AUTH.DATA.QUEUE The queue that holds access control lists for the queue manager. 
SYSTEM.CHANNEL.INITQ Channel initiation queue 
SYSTEM.CHANNEL.SYNCQ The queue that holds the synchronization data for channels. 
SYSTEM.CICS.INITIATION.QUEUE Default CICS initiation queue. 
SYSTEM.CLUSTER.COMMAND.QUEUE The queue used to carry messages to the repository queue manager. 
SYSTEM.CLUSTER.REPOSITORY.QUEUE The queue used to store all repository information 
SYSTEM.CLUSTER.TRANSMIT.QUEUE The transmission queue for all messages to all clusters 
SYSTEM.DEAD.LETTER.QUEUE Dead-letter (undelivered-message) queue.
System Default Objects 
Object Name Description 
SYSTEM.DEFAULT.ALIAS.QUEUE Default alias queue 
SYSTEM.DEFAULT.INITIATION.QUEUE Default initiation queue 
SYSTEM.DEFAULT.LOCAL.QUEUE Default local queue 
SYSTEM.DEFAULT.MODEL.QUEUE Default model queue 
SYSTEM.DEFAULT.REMOTE.QUEUE Default remote queue 
SYSTEM.MQSC.REPLY.QUEUE MQSC command reply-to queue. This is a model queue. 
SYSTEM.PENDING.DATA.QUEUE Support deferred messages in JMS. 
SYSTEM.DEFAULT.NAMELIST Default namelist. 
SYSTEM.DEFAULT.PROCESS Default process definition.
System Default Objects 
Object Name Description 
SYSTEM.DEFAULT.AUTHINFO. CRLLDAP Default authentication information object. 
SYSTEM.AUTO.RECEIVER Dynamic receiver channel. 
SYSTEM.AUTO.SVRCONN Dynamic server-connection channel. 
SYSTEM.DEF.CLUSRCVR Default receiver channel for the cluster 
SYSTEM.DEF.CLUSSDR Default sender channel for the cluster 
SYSTEM.DEF.RECEIVER Default receiver channel. 
SYSTEM.DEF.REQUESTER Default requester channel. 
SYSTEM.DEF.SENDER Default sender channel. 
SYSTEM.DEF.SERVER Default server channel. 
SYSTEM.DEF.SVRCONN Default server-connection channel. 
SYSTEM.DEF.CLNTCONN Default client-connection channel.
Basic MQ Administration
Basic Administration* 
Define MQ Objects 
Display MQ Objects 
Alter MQ Objects 
Delete MQ Objects 
Miscellaneous 
* - Control Commands and MQSC Commands
MQM Administration 
Create MQ Manager 
CRTMQM 
e.g. CRTMQM /q TESTQMGR 
/q – sets the MQM as default 
Start MQ Manager 
STRMQM 
e.g. STRMQM TESTQMGR 
Stop MQ Manager 
ENDMQM 
e.g. ENDMQM TESTQMGR 
Delete MQ Manager 
DLTMQM 
e.g. ENDMQM TESTQMGR
MQM Administration 
Stop MQ Manager ENDMQM Options 
By default MQM is quiesced and so takes time 
-c to notifies all applications to stop but doesn't wait for MQM to end 
-c is same as issuing ENDMQM with no options 
-w waits until apps stop and MQM ends 
-i immediate and doesn't wait for apps to disconnect 
-p pre-emptive and should be used with caution
Managing MQM Objects 
MQSC Commands by running RUNMQSC 
Verify a command without running it 
Run a command on a local queue manager 
Run a command on a remote queue manager 
To display MQM properties 
STRMQM TESTQMGR (if not started already) 
RUNMQSC or RUNMQSC TESTQMGR 
display QMGR (MQSC Command) 
END 
RUNMQSC can accept commands through key board or from a file 
RUNMQSC < command.in > execution.out
Managing Queues 
Create a local queue 
DEFINE QLOCAL(TEST.LOCAL.QUEUE) 
Display a local queue 
DISPLAY QLOCAL(TEST.LOCAL.QUEUE) 
Alter a local queue 
ALTER QLOCAL(TEST.LOCAL.QUEUE) + GET(DISABLED) 
Delete a local queue 
DELETE QLOCAL(TEST.LOCAL.QUEUE) PURGE
Managing Trigger Processes 
Create a Process 
DEFINE PROCESS(PROC1) REPLACE + 
DESCR('test proc') APPLTYPE(WINDOWS)+ 
APPLICID('c:testprog.exe') 
Display a Process 
DISPLAY PROCESS(PROC1) 
Alter a Process 
ALTER PROCESS(PROC1)USERDATA('12') 
Delete a Process 
DELETE PROCESS(PROC1)
Enabling Triggers 
Enabling trigger in a queue 
DEFINE QLOCAL(TEST.LOCAL.QUEUE)REPLACE + 
TRIGGER TRIGTYPE(first)PROCESS(PROC1)+ 
INITQ(SYSTEM.DEFAULT.INITIATION.QUEUE) 
Trigger Types 
every 
first 
N messages
Managing Channels 
Create a Channel 
DEFINE CHANNEL(MQMA.MQMB)CHLTYPE(sdr)+ 
XMITQ(MQMB) TRPTYPE(tcp)+ 
CONNAME(SERVER1.XYZ.COM) 
Display a Channel 
DISPLAY CHANNEL(MQMA.MQMB) 
Alter a Channel 
ALTER CHANNEL(MQMA.MQMB)+ CONNAME(SERVER2.XYZ.COM) 
Delete a Channel 
DELETE CHANNEL(MQMA.MQMB)
Managing Namelist 
Create a Namelist 
DEFINE NAMELIST(CLUSTERNL)+ 
NAMES(CLUSA,CLUSB)+ 
NLTYPE(CLUSTER)REPLACE 
Display a Namelist 
DISPLAY NAMELIST(CLUSTERNL) 
Alter a Namelist 
DEFINE NAMELIST(CLUSTERNL)+ 
NAMES(CLUSA,CLUSB,CLUSC)+ 
NLTYPE(CLUSTER) 
Delete a Namelist 
DELETE NAMELIST(CLUSTERNL)
Hands-on Part 1 MQ Administration
Distributed MQ
Distributed MQ 
Transferring messages between Queue Managers 
Queue Managers can be on the same machine or world apart 
Queue Managers can be on the same platform or hetrogenous platforms 
Implemented using Distributed Queue Management (DQM) features of MQ including MQ Clusters
Distributed MQ Components 
Local and remote Queue Managers and queues 
Local is one to which an application is connected 
Remote queue definition 
Local definition of a queue in a remote MQM 
Transmission Queues 
Special local queue to store message temporarily before transmitting to remote destination 
Message channel agents (MCA) 
Software that handles sending and receiving 
Channels 
One way communication link between MQMs
Distributed MQ Components 
Dead letter queue 
Special queue to store undelivered messages 
Transport Service 
Communication protocol independent of MQ 
MQ supports multiple protocols 
Platform dependent 
Channel Initiators and Listeners 
Initiators are trigger monitors for sender channels 
Listeners start receiver channels on receiving request from the sender MCA 
Channel Exit Programs 
Used for additional processing like encryption
Distributed MQ Components 
M C A 
M C A 
M C A 
M C A 
Channel 
Channel 
Transport Service (TCP) 
Transport Service (TCP) 
App Q 
App Q 
App Q 
App Q 
XMIT Q 
XMIT Q 
QM1 
QM2 
Channel Initiator 
Listener 
Init Q
Sample DQM Definition1 
CHAD – Channel Auto Definition
Sample DQM Definition 
On QMA Define QREMOTE(Q1)+ RNAME(Q1)+ RQMNAME(QMB)+ XMITQ(QMB) DEFINE QLOCAL(QMB)+ USAGE(XMITQ) DEFINE CHANNEL(A.B)+ CHLTYPE(sdr)+ XMITQ(QMB)+ TRPTYPE(tcp)+ CONNAME(SERVERB.COM) DEFINE QLOCAL(Q2) DEFINE CHANNEL(B.A)+ CHLTYPE(rcvr)+ TRPTYPE(tcp) 
On QMB DEFINE QLOCAL(Q1) DEFINE CHANNEL(A.B)+ CHLTYPE(rcvr)+ TRPTYPE(tcp) Define QREMOTE(Q2)+ RNAME(Q2)+ RQMNAME(QMA)+ XMITQ(QMA) DEFINE QLOCAL(QMA)+ USAGE(XMITQ) DEFINE CHANNEL(B.A)+ CHLTYPE(sdr)+ XMITQ(QMA)+ TRPTYPE(tcp)+ CONNAME(SERVERA.COM)
Channel Types & Combinations 
Channel Types 
Sender 
Receiver 
Server 
Requester 
Cluster Sender 
Cluster Receiver 
Valid Combinations 
Sender - Receiver 
Requester - Server 
Requester - Sender 
Server - Receiver 
Cluster Sender – Cluster Receiver
Queue Addressing & Aliases 
Queue Name + Queue Manager Name + Transmission Queue (if remote queue) 
Remote Queue Definition 
Resolves the remote queue location 
Queue Manager Alias Definition 
Specifies alternative names for the message descriptor of a “send” message 
Reply-to Queue Alias Definition 
Specifies alternative names for the reply information in the message descriptor 
Aliases are characterized by a blank RNAME in the remote queue definition
Remote Queue Definition 
Remote Queue Definition 
Define QREMOTE(Q1)RNAME(Q1)+ RQMNAME(QMB)XMITQ(QMB) 
Resolves the remote queue address using the remote queue manager, remote queue name and the transmission queue 
If the transmission queue is not specified, a transmission queue with the name of the remote queue manager will be used 
If not available, the default transmission queue of the queue manager will be used
Queue Manager Alias 
Queue Manager Alias 
Define QREMOTE(QMB_Test)RNAME()+ RQMNAME(QMB) 
Define QREMOTE(QMB_Test)RNAME()+ RQMNAME(QMB)XMITQ(QMC) 
Messages with MQM QMB_Test in the descriptor will be modified to QMB before being forwarded 
XMITQ parameter can be used to steer the message to use a specified channel 
If transmission queue is not specified, the logic detailed in the previous slide will be used
Reply-to Queue Alias 
Can be used to alter the reply-to queue and queue manager without changing the application 
At the sender queue manager 
Define QREMOTE(QMA_Reply) + RNAME(Answer_QMA)RQMNAME(QMA_Return) 
Define QREMOTE(QMA_Return)RNAME()+ RQMNAME(QMA) 
In “PUT” call leave the “reply to queue manager” blank and set the queue name to QMA_Reply 
At the replying queue manager 
Define QLOCAL(QMA_Return)USAGE(XMITQ)
Reaching Remote Queue Managers 
Point to point 
Multi-hopping 
Using shared channels 
Using multiple channels 
Using MQ clusters
DMQ Commands 
Start Channel Initiators 
RUNMQCHI -q IQ (Control Command) 
START CHINIT INITQ(IQ) (MQSC Command) 
Stopping Channel Initiators 
Alter the init queue to disable GET from queue 
Start MQM Listeners 
RUNMQLSR -t TCP -m MQM-p 1414 (control Command)* 
START LISTENER IPADDR(X.X.X.X) PORT(nnnn) TRPTYPE(tcp) (MQSC Command) 
*-This requires editing of /etc/services and /etc/inetd.conf files to add 
MQSeries 1414/tcp #MQ Listener 
MQSeries stream tcp nowait mqm /usr/mqm/bin/amqcrsta -q mqm.name
DMQ Commands 
Stop MQM Listeners 
ENDMQLSR -m MQM (control Command) 
STOP LISTENER IPADDR(X.X.X.X) PORT(nnnn) TRPTYPE(tcp) (MQSC Command) 
Start MQ Channel 
RUNMQCHL -c CHANNEL -m QM (Control Command) 
START CHANNEL(channel-name) (MQSC Command) 
Stop MQ Channel 
STOP CHANNEL(channel-name) (MQSC Command) 
Display MQ Channel Status 
DISPLAY CHSTATUS(channel-name) (MQSC Command)
DMQ Commands 
To test a channel 
PING CHANNEL(channel-name) (MQSC Command)
MQ Clusters
DQM vs Clusters 
DQM Components Local MQM 
Remote Q definition 
Xmit Q definition 
Sender Channel 
Remote MQM 
Local Q 
Receiver Channel 
Listener 
Cluster Definitions Local MQM 
Cluster receiver channl 
Cluster sender channel 
Remote MQM 
Cluster receiver channl 
Cluster sender channel
Cluster Advantages 
Reduced system administration due to reduced number of definitions 
Increased availability and scalability due to easy administration and multiple instances of queues 
Work load balancing using multiple instances of queues
Cluster Component Details 
MQ Cluster is a network of logically related MQMs and need to be unique in an enterprise 
Cluster Queue Manager is a MQM that is a member of a MQ Cluster and should be unique in the cluster 
Cluster Queue is a queue hosted in a cluster queue manager and is available to all MQM in a cluster 
Repository is a collection of information about the queue managers that are part of a cluster 
Full Repository is one which stores a complete set of information about all MQMs in the cluster 
Partial Repository is one which stores information which is required to deal with interested MQMs
Cluster Component Details 
Repository Queue manager is a cluster queue manager which stores a full repository 
SYSTEM.CLUSTER.REPOSITORY.QUEUE 
Cluster Receiver Channel is the receiving end of a channel on which cluster MQMs can receive messages from other MQMs in the cluster 
Cluster Sender Channel is the sending end of a channel on which cluster MQMs can send cluster information to one of the full repositories 
Cluster Transmission Queue transmits all messages from a cluster MQM to any MQM in the cluster 
SYSTEM.CLUSTER.TRANSMIT.QUEUE 
Command Queue is used to make requests and get responses from full repositories
Clustered MQ Components 
Cluster Receiver Channel 
Cluster Receiver Channel 
Transport Service (TCP) 
Transport Service (TCP) 
App Q 
App Q1 
App Q 
App Q1 
XMIT Q 
QM1 
QM2 
Full Repository 
Full Repository 
Cluster Sender Channel 
Cluster - CLUA 
XMIT Q
Cluster Definition 
On QM1 RUNMQSC ALTER QMGR REPOS(CLUA) DEFINE CHANNEL(TO.QM1)+ CHLTYPE(CLUSRCVR)+ TRPTYPE(tcp)+ CONNAME(QM1.COM)+ CLUSTER(CLUA) DEFINE CHANNEL(TO.QM2)+ CHLTYPE(CLUSSDR)+ TRPTYPE(tcp)+ CONNAME(QM2.COM)+ CLUSTER(CLUA) DEFINE QLOCAL(Q1)+ CLUSTER(CLUA) 
On QM2 RUNMQSC ALTER QMGR REPOS(CLUA) DEFINE CHANNEL(TO.QM2)+ CHLTYPE(CLUSRCVR)+ TRPTYPE(tcp)+ CONNAME(QM1.COM)+ CLUSTER(CLUA) DEFINE CHANNEL(TO.QM1)+ CHLTYPE(CLUSSDR)+ TRPTYPE(tcp)+ CONNAME(QM1.COM)+ CLUSTER(CLUA) DEFINE QLOCAL(Q)+ CLUSTER(CLUA)
Adding new QM (QM3) to Cluster 
RUNMQSC DEFINE CHANNEL(TO.QM3)+ CHLTYPE(CLUSRCVR)+ TRPTYPE(tcp)+ CONNAME(QM3.COM)+ CLUSTER(CLUA) DEFINE CHANNEL(TO.QM1)+ CHLTYPE(CLUSSDR)+ TRPTYPE(tcp)+ CONNAME(QM1.COM)+ CLUSTER(CLUA) Note: QM3 doesn't store a full repository and points to QM1 repository
Adding new QM on DHCP to Cluster 
RUNMQSC DEFINE CHANNEL(TO.QM3)+ CHLTYPE(CLUSRCVR)+ TRPTYPE(tcp)+ CONNAME('')+ CLUSTER(CLUA) DEFINE CHANNEL(TO.+QMNAME+)+ CHLTYPE(CLUSSDR)+ TRPTYPE(tcp)+ CONNAME(QM2.COM)+ CLUSTER(CLUA) Note: the channel definition TO.+QMNAME+ will be replaced by TO.QM2
Verifying a Cluster 
Each MQM require a channel initiator to monitor the system defined init Q SYSTEM.CHANNEL.INITQ 
START CHINIT 
Each MQM require a channel listener to listen to incoming network requests 
START LISTENER PORT(1414)+ TRPTYPE(TCP) 
Verify all the available MQMs in the cluster 
DISPLAY CLUSQMGR(*) 
Verify all the channel statuses 
DISPLAY CHSTATUS(*)
Load Balancing Using Cluster 
Define the same queue in multiple queue managers in the cluster 
MQ series will use the default algorithm (round robin) to identify MQM and transfer message 
Default algorithm can be changed using the cluster workload user exit
Hands-on Part 2 Creating MQ Clusters
MQ Programming
Messaging and Queuing Patterns 
One to one 
One to many 
Many to one 
Publish/Subscribe 
Request/reply 
One-way datagram or send-and-forget
One to One Pattern 1
One to Many Pattern 1
Many to One Pattern 1
Publish/Subscribe Pattern 1
Request/Reply Pattern 1
Send and Forget Pattern1 (Datagram)
Transaction Management 
ACID unit of work 
Single phase commit 
Two phase commit with XA specification compliant resource managers 
BackoutCount and BackoutThreshold attributes to avoid looping
Message Queuing Interface (MQI) 
Call Purpose 
MQCONN Connect to a Queue Manager 
MQDISC Disconnect from a Queue Manager 
MQOPEN Open a specific Queue 
MQCLOSE Close a Queue 
MQPUT Put a message on a queue 
MQGET Get a message from a queue 
MQPUT1 MQOPEN + MQPUT + MQCLOSE 
MQINQ Inquire Properties of an object 
MQSET Set properties of an object 
MQCONNX Standard or fast path bindings 
MQBEGIN Begin an unit of work 
MQCMIT Commit an unit of work 
MQBACK Back out to the start of unit of work
MQI Data Structures 
Name Purpose 
MQBO Specifies options for MQBEGIN call 
MQCNO Specifies options for MQCONNX call 
MQDH Describes the data in a distribution-list message 
MQGMO Specifies options for MQGET call 
MQMD Message descriptor details to control message in a MQGET or MQPUT call 
MQOD Object descriptor which is required in a MQOPEN call 
MQOR Object record identifies the destinations to work with in a distribution list 
MQPMO Specifies options for MQPUT call
MQ Programming Sequence 
MQCONN 
MQOPEN 
BASIC OP 
MQCLOSE 
MQDISC 
Connect to MQM 
Open MQ Objects 
Perform n operations 
Close MQ Objects 
Disconnect from MQM
MQ JAVA Programming
JAVA Programming Environment 
Required jar file 
com.ibm.mq.jar 
Normally found in the MQ installation directory 
Environment variable set-up 
Add com.ibm.mq.jar to the classpath 
CLASSPATH=install_dirlibcom.ibm.mq.jar 
install_dir is platform dependent 
Import required package in the code 
Import com.ibm.mq.*;
Connection Modes 
Connection Modes 
Binding Mode 
Client Connection Mode
MQ Series JAVA Classes 
MQEnvironment 
Contains the static variables that control the environment in which a MQQueueManager is constructed 
MQQueueManager 
Represents the MQ series queue manager 
MQQueue 
Provides inquiry, set,put,get operations for queues 
MQMessage 
Represents the descriptor and data of a MQ message 
MQPutOptions 
Contains options which control MQQueue.put() method 
MQGetOptions 
Contains options which control MQQueue.get() method 
MQException 
Contains completion codes and error code constants
Setting up the Connection 
MQEnvironment.hostname=“TEST.SERVER.COM” MQEnvironment.channel=“TEST.CLIENT.CHNL” MQEnvironment.port=1638 MQEnvironment.userId=”userABC” MQEnvironment.password=”password” MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY,MQC.TRANSPORT_MQSERIES) MQQueueManager qMgr = new MQQueueManager(“TEST”);
Interacting with Queues - Put 
Int openOptions = MQC.MQOO_OUTPUT|MQC.MQOO_FAIL_IF_QUIESCING; MQQueue queue = qMgr.accessQueue(“TestQ”,openOptions); MQPutMessageOptions pmo = new MQPutMessageOptions(); MQMessage outMsg = new MQMessage(); outMsg.format = MQC.MQFMT_STRING; String msgString = “Test message”; outMsg.writeString(msgString); queue.put(outMsg,pmo);
Interacting with Queues - Get 
Int openOptions = MQC.MQOO_INPUT_SHARED|MQC.MQOO_FAIL_IF_QUIESCING; MQQueue queue = qMgr.accessQueue(“TestQ”,openOptions); MQGetMessageOptions gmo = new MQGetMessageOptions(); gmo.options = gmo.options + MQC.MQGMO_SYNCPOINT; gmo.options = gmo.options + MQC.MQGMO_WAIT; gmo.waitInterval = 3000; MQMessage inMsg = new MQMessage(); queue.put(inMsg,gmo);
Closing the Connection 
qMgr.commit(); queue.close(); qMgr.disconnect();
Hands-on Part 3 MQ Programming
MQ Security
Security Services 
Identification and Authentication 
Access Control 
Confidentiality 
Data Integrity 
Non repudiation 
Managing security is more concerned with managing risk to a level that is acceptable to the business.
Security Mechanism 
Access Control Lists 
Cryptography 
Digital Signatures
Security Terminology & Concepts 
Cryptography 
Message Digests 
Digital Signatures 
Digital Certificates 
Certification Authorities 
Public Key Infrastructure (PKI) 
Secure Sockets Layer (SSL)
Cryptography 
Concept 
Convert plain text to ciphertext called encryption 
Transmit ciphertext to receiver 
Convert ciphertext to plain text called decryption 
Symmetric algorithms share same key and involves key distribution problem 
Asymmetric algorithms use different keys; Public Key Cryptography 
Strength of encryption determined by key size; 512 bits, 768 bits, 1024 bits 
Encryption algorithms can be on data blocks or on each byte of data
Message Digest 
Concept 
Fixed size numeric representation of contents of message 
Computed by hash function which is one way 
No two different message will have the same value 
Also called Message Authentication Code (MAC) 
Message digest is sent along with the message 
Receiver generates a digest and compares with what was received
Digital Signatures 
Concept 
Formed by encrypting a representation of message 
Encryption done using the private key of the signatory 
Normally done on the message digest for efficiency 
Digital Signature sent along with the message 
Receiver retrieves the message digest using the public key of the signatory 
Computes the digest from the message received and the compares against the digest retrieved 
Can involve man in the middle attack with public key distribution
Digital Certificates 
Concept 
Binds public key to a owner and prevents impersonation 
Also known as public key certificates 
Involves trusted third party called Certification Authority 
Digital Certificates include 
Owner's public key 
Owner's distinguished name: CN,O,OU,L,ST,C 
Distinguished name of the issuer 
Date from which the certificate is valid 
Expiry date of the certificate 
Version number 
Serial number 
Need to make a request and receive digital certificate from a CA
Digital Certificates 
Concept 
Binds public key to a owner and prevents impersonation 
Involves trusted third party called Certification Authority 
Also known as public key certificates 
Digital Certificates include 
Owner's public key 
Owner's distinguished name: CN,O,OU,L,ST,C 
Distinguished name of the issuer 
Date from which the certificate is valid 
Expiry date of the certificate 
Version number 
Serial number 
Need to make a request and receive certificate from a CA
Public Key Infrastructure (PKI) 
System of facilities, policies and services that support the use of Public Key Cryptography 
Typically involves Certification Authorities (CA) and Registration Authorities (RA) which does 
Issuing digital certificates 
Validation digital certificates 
Revoking digital certificates 
Distribution public keys 
RA does the verification of information provided in the request for certificate to CA
Secured Sockets Layer1 (SSL)
MQ Security Considerations 
Authority to administer Websphere MQ 
Authority to work with Websphere MQ objects 
Channel Security 
MQ Clusters 
MQ Publish/Subscribe 
MQ Internet Pass-Thru 
Link level security 
Application level security
MQ Security Options 
MQM can verify the administration authority 
MQM can verify the authority to access objects 
MCA can authenticate a partner MCA 
Messages can be encrypted before sending and decrypted when receiving 
User-id in the message descriptor can be used to verify the authority to access MQM objects 
COA and COD report options to implement non- repudiation functions in an application
MQ Framework
MQ Framework Components 
Trigger Monitor Interface 
Message Channel Interface 
Name Service Interface 
Security Enabling Interface 
Data Conversion Interface
MQ Performance
MQ Performance Improvement 
Use MQCONNX with fastpath binding option 
The application should be trusted 
Use MQCONNX to create thread independent connection
bnair@asquareb.com 
blog.asquareb.com 
https://github.com/bijugs 
@gsbiju

More Related Content

What's hot

Websphere MQ admin guide
Websphere MQ admin guideWebsphere MQ admin guide
Websphere MQ admin guideRam Babu
 
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
 
Mq presentation
Mq presentationMq presentation
Mq presentationxddu
 
IBM MQ High Availability 2019
IBM MQ High Availability 2019IBM MQ High Availability 2019
IBM MQ High Availability 2019David Ware
 
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
 
531: Controlling access to your IBM MQ system
531: Controlling access to your IBM MQ system531: Controlling access to your IBM MQ system
531: Controlling access to your IBM MQ systemRobert Parker
 
IBM MQ on cloud and containers
IBM MQ on cloud and containersIBM MQ on cloud and containers
IBM MQ on cloud and containersRobert Parker
 
Introduction To RabbitMQ
Introduction To RabbitMQIntroduction To RabbitMQ
Introduction To RabbitMQKnoldus Inc.
 
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
 
IBM MQ and Kafka, what is the difference?
IBM MQ and Kafka, what is the difference?IBM MQ and Kafka, what is the difference?
IBM MQ and Kafka, what is the difference?David Ware
 
IBM MQ: Using Publish/Subscribe in an MQ Network
IBM MQ: Using Publish/Subscribe in an MQ NetworkIBM MQ: Using Publish/Subscribe in an MQ Network
IBM MQ: Using Publish/Subscribe in an MQ NetworkDavid Ware
 
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 MQ cloud architecture blueprint
IBM MQ cloud architecture blueprintIBM MQ cloud architecture blueprint
IBM MQ cloud architecture blueprintMatt Roberts
 
IBM Web Shpere MQ ppt
IBM Web Shpere MQ pptIBM Web Shpere MQ ppt
IBM Web Shpere MQ pptParth Shah
 
REST APIs and MQ
REST APIs and MQREST APIs and MQ
REST APIs and MQMatt Leming
 
Ame 2269 ibm mq high availability
Ame 2269 ibm mq high availabilityAme 2269 ibm mq high availability
Ame 2269 ibm mq high availabilityAndrew Schofield
 
IBM MQ - better application performance
IBM MQ - better application performanceIBM MQ - better application performance
IBM MQ - better application performanceMarkTaylorIBM
 

What's hot (20)

Websphere MQ admin guide
Websphere MQ admin guideWebsphere MQ admin guide
Websphere MQ admin guide
 
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
 
Mq presentation
Mq presentationMq presentation
Mq presentation
 
IBM MQ High Availability 2019
IBM MQ High Availability 2019IBM MQ High Availability 2019
IBM MQ High Availability 2019
 
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
 
531: Controlling access to your IBM MQ system
531: Controlling access to your IBM MQ system531: Controlling access to your IBM MQ system
531: Controlling access to your IBM MQ system
 
IBM MQ on cloud and containers
IBM MQ on cloud and containersIBM MQ on cloud and containers
IBM MQ on cloud and containers
 
Rabbitmq basics
Rabbitmq basicsRabbitmq basics
Rabbitmq basics
 
Introduction To RabbitMQ
Introduction To RabbitMQIntroduction To RabbitMQ
Introduction To RabbitMQ
 
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
 
IBM MQ and Kafka, what is the difference?
IBM MQ and Kafka, what is the difference?IBM MQ and Kafka, what is the difference?
IBM MQ and Kafka, what is the difference?
 
IBM MQ: Using Publish/Subscribe in an MQ Network
IBM MQ: Using Publish/Subscribe in an MQ NetworkIBM MQ: Using Publish/Subscribe in an MQ Network
IBM MQ: Using Publish/Subscribe in an MQ Network
 
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 MQ V9 Overview
IBM MQ V9 OverviewIBM MQ V9 Overview
IBM MQ V9 Overview
 
IBM MQ cloud architecture blueprint
IBM MQ cloud architecture blueprintIBM MQ cloud architecture blueprint
IBM MQ cloud architecture blueprint
 
IBM MQ V8 Security
IBM MQ V8 SecurityIBM MQ V8 Security
IBM MQ V8 Security
 
IBM Web Shpere MQ ppt
IBM Web Shpere MQ pptIBM Web Shpere MQ ppt
IBM Web Shpere MQ ppt
 
REST APIs and MQ
REST APIs and MQREST APIs and MQ
REST APIs and MQ
 
Ame 2269 ibm mq high availability
Ame 2269 ibm mq high availabilityAme 2269 ibm mq high availability
Ame 2269 ibm mq high availability
 
IBM MQ - better application performance
IBM MQ - better application performanceIBM MQ - better application performance
IBM MQ - better application performance
 

Viewers also liked

HDFS User Reference
HDFS User ReferenceHDFS User Reference
HDFS User ReferenceBiju Nair
 
Netezza workload management
Netezza workload managementNetezza workload management
Netezza workload managementBiju Nair
 
Project Risk Management
Project Risk ManagementProject Risk Management
Project Risk ManagementBiju Nair
 
Using Netezza Query Plan to Improve Performace
Using Netezza Query Plan to Improve PerformaceUsing Netezza Query Plan to Improve Performace
Using Netezza Query Plan to Improve PerformaceBiju Nair
 
Row or Columnar Database
Row or Columnar DatabaseRow or Columnar Database
Row or Columnar DatabaseBiju Nair
 
Apache HBase Performance Tuning
Apache HBase Performance TuningApache HBase Performance Tuning
Apache HBase Performance TuningLars Hofhansl
 
Netezza fundamentals for developers
Netezza fundamentals for developersNetezza fundamentals for developers
Netezza fundamentals for developersBiju Nair
 
NENUG Apr14 Talk - data modeling for netezza
NENUG Apr14 Talk - data modeling for netezzaNENUG Apr14 Talk - data modeling for netezza
NENUG Apr14 Talk - data modeling for netezzaBiju Nair
 
HBase Application Performance Improvement
HBase Application Performance ImprovementHBase Application Performance Improvement
HBase Application Performance ImprovementBiju Nair
 

Viewers also liked (10)

HDFS User Reference
HDFS User ReferenceHDFS User Reference
HDFS User Reference
 
Netezza workload management
Netezza workload managementNetezza workload management
Netezza workload management
 
Project Risk Management
Project Risk ManagementProject Risk Management
Project Risk Management
 
Using Netezza Query Plan to Improve Performace
Using Netezza Query Plan to Improve PerformaceUsing Netezza Query Plan to Improve Performace
Using Netezza Query Plan to Improve Performace
 
Row or Columnar Database
Row or Columnar DatabaseRow or Columnar Database
Row or Columnar Database
 
Concurrency
ConcurrencyConcurrency
Concurrency
 
Apache HBase Performance Tuning
Apache HBase Performance TuningApache HBase Performance Tuning
Apache HBase Performance Tuning
 
Netezza fundamentals for developers
Netezza fundamentals for developersNetezza fundamentals for developers
Netezza fundamentals for developers
 
NENUG Apr14 Talk - data modeling for netezza
NENUG Apr14 Talk - data modeling for netezzaNENUG Apr14 Talk - data modeling for netezza
NENUG Apr14 Talk - data modeling for netezza
 
HBase Application Performance Improvement
HBase Application Performance ImprovementHBase Application Performance Improvement
HBase Application Performance Improvement
 

Similar to Websphere MQ (MQSeries) fundamentals

Ibm websphere mq
Ibm websphere mqIbm websphere mq
Ibm websphere mqRakeshtoodi
 
MSMQ - Microsoft Message Queueing
MSMQ - Microsoft Message QueueingMSMQ - Microsoft Message Queueing
MSMQ - Microsoft Message QueueingPeter R. Egli
 
WebSphere MQ Admin Classroom Training
WebSphere MQ Admin Classroom TrainingWebSphere MQ Admin Classroom Training
WebSphere MQ Admin Classroom TrainingSrihitha Technologies
 
HHM-2833: Where is My Message?: Using IBM MQ Tools to Work Out What Applicati...
HHM-2833: Where is My Message?: Using IBM MQ Tools to Work Out What Applicati...HHM-2833: Where is My Message?: Using IBM MQ Tools to Work Out What Applicati...
HHM-2833: Where is My Message?: Using IBM MQ Tools to Work Out What Applicati...Matt Leming
 
Securing your IBM MQ environment.
Securing your IBM MQ environment.Securing your IBM MQ environment.
Securing your IBM MQ environment.Robert Parker
 
Introduction to OMA LightweightM2M by OMA Device Management Chairman (IoT Wor...
Introduction to OMA LightweightM2M by OMA Device Management Chairman (IoT Wor...Introduction to OMA LightweightM2M by OMA Device Management Chairman (IoT Wor...
Introduction to OMA LightweightM2M by OMA Device Management Chairman (IoT Wor...Open Mobile Alliance
 
05 mq series_admin-win_unix_aix_ch02.ds
05 mq series_admin-win_unix_aix_ch02.ds05 mq series_admin-win_unix_aix_ch02.ds
05 mq series_admin-win_unix_aix_ch02.dskarthickmsit
 
Saiprasad websphere MQ Online Training from Chennai.
Saiprasad websphere MQ Online Training from Chennai.Saiprasad websphere MQ Online Training from Chennai.
Saiprasad websphere MQ Online Training from Chennai.saiprasad1234
 
Hannover Messe 2017 - Systems Federation in industrie 4.0
Hannover Messe 2017 - Systems Federation in industrie 4.0Hannover Messe 2017 - Systems Federation in industrie 4.0
Hannover Messe 2017 - Systems Federation in industrie 4.0Clemens Vasters
 
DataPower-MQ Integration Deep Dive
DataPower-MQ Integration Deep DiveDataPower-MQ Integration Deep Dive
DataPower-MQ Integration Deep DiveMorag Hughson
 
Message Queues a basic overview
Message Queues a basic overviewMessage Queues a basic overview
Message Queues a basic overviewGeshan Manandhar
 
komdat1
komdat1komdat1
komdat1pasca
 
komdat1
komdat1komdat1
komdat1pasca
 

Similar to Websphere MQ (MQSeries) fundamentals (20)

Ibm websphere mq
Ibm websphere mqIbm websphere mq
Ibm websphere mq
 
MSMQ - Microsoft Message Queueing
MSMQ - Microsoft Message QueueingMSMQ - Microsoft Message Queueing
MSMQ - Microsoft Message Queueing
 
WebSphere MQ Admin Classroom Training
WebSphere MQ Admin Classroom TrainingWebSphere MQ Admin Classroom Training
WebSphere MQ Admin Classroom Training
 
HHM-2833: Where is My Message?: Using IBM MQ Tools to Work Out What Applicati...
HHM-2833: Where is My Message?: Using IBM MQ Tools to Work Out What Applicati...HHM-2833: Where is My Message?: Using IBM MQ Tools to Work Out What Applicati...
HHM-2833: Where is My Message?: Using IBM MQ Tools to Work Out What Applicati...
 
On MQ Series & JMS
On MQ Series & JMSOn MQ Series & JMS
On MQ Series & JMS
 
Ibm mq
Ibm mqIbm mq
Ibm mq
 
Resume
ResumeResume
Resume
 
Securing your IBM MQ environment.
Securing your IBM MQ environment.Securing your IBM MQ environment.
Securing your IBM MQ environment.
 
T3UC_PresentationT3UC2012_Rajesh
T3UC_PresentationT3UC2012_RajeshT3UC_PresentationT3UC2012_Rajesh
T3UC_PresentationT3UC2012_Rajesh
 
Introduction to OMA LightweightM2M by OMA Device Management Chairman (IoT Wor...
Introduction to OMA LightweightM2M by OMA Device Management Chairman (IoT Wor...Introduction to OMA LightweightM2M by OMA Device Management Chairman (IoT Wor...
Introduction to OMA LightweightM2M by OMA Device Management Chairman (IoT Wor...
 
IBM MQ Basics
IBM MQ BasicsIBM MQ Basics
IBM MQ Basics
 
05 mq series_admin-win_unix_aix_ch02.ds
05 mq series_admin-win_unix_aix_ch02.ds05 mq series_admin-win_unix_aix_ch02.ds
05 mq series_admin-win_unix_aix_ch02.ds
 
IBM MQ Series For ZOS
IBM MQ Series For ZOSIBM MQ Series For ZOS
IBM MQ Series For ZOS
 
Saiprasad websphere MQ Online Training from Chennai.
Saiprasad websphere MQ Online Training from Chennai.Saiprasad websphere MQ Online Training from Chennai.
Saiprasad websphere MQ Online Training from Chennai.
 
Hannover Messe 2017 - Systems Federation in industrie 4.0
Hannover Messe 2017 - Systems Federation in industrie 4.0Hannover Messe 2017 - Systems Federation in industrie 4.0
Hannover Messe 2017 - Systems Federation in industrie 4.0
 
DataPower-MQ Integration Deep Dive
DataPower-MQ Integration Deep DiveDataPower-MQ Integration Deep Dive
DataPower-MQ Integration Deep Dive
 
Message Queues a basic overview
Message Queues a basic overviewMessage Queues a basic overview
Message Queues a basic overview
 
komdat1
komdat1komdat1
komdat1
 
komdat1
komdat1komdat1
komdat1
 
Overview of Mule
Overview of MuleOverview of Mule
Overview of Mule
 

More from Biju Nair

Chef conf-2015-chef-patterns-at-bloomberg-scale
Chef conf-2015-chef-patterns-at-bloomberg-scaleChef conf-2015-chef-patterns-at-bloomberg-scale
Chef conf-2015-chef-patterns-at-bloomberg-scaleBiju Nair
 
HBase Internals And Operations
HBase Internals And OperationsHBase Internals And Operations
HBase Internals And OperationsBiju Nair
 
Apache Kafka Reference
Apache Kafka ReferenceApache Kafka Reference
Apache Kafka ReferenceBiju Nair
 
Serving queries at low latency using HBase
Serving queries at low latency using HBaseServing queries at low latency using HBase
Serving queries at low latency using HBaseBiju Nair
 
Multi-Tenant HBase Cluster - HBaseCon2018-final
Multi-Tenant HBase Cluster - HBaseCon2018-finalMulti-Tenant HBase Cluster - HBaseCon2018-final
Multi-Tenant HBase Cluster - HBaseCon2018-finalBiju Nair
 
Cursor Implementation in Apache Phoenix
Cursor Implementation in Apache PhoenixCursor Implementation in Apache Phoenix
Cursor Implementation in Apache PhoenixBiju Nair
 
Hadoop security
Hadoop securityHadoop security
Hadoop securityBiju Nair
 
Chef patterns
Chef patternsChef patterns
Chef patternsBiju Nair
 

More from Biju Nair (8)

Chef conf-2015-chef-patterns-at-bloomberg-scale
Chef conf-2015-chef-patterns-at-bloomberg-scaleChef conf-2015-chef-patterns-at-bloomberg-scale
Chef conf-2015-chef-patterns-at-bloomberg-scale
 
HBase Internals And Operations
HBase Internals And OperationsHBase Internals And Operations
HBase Internals And Operations
 
Apache Kafka Reference
Apache Kafka ReferenceApache Kafka Reference
Apache Kafka Reference
 
Serving queries at low latency using HBase
Serving queries at low latency using HBaseServing queries at low latency using HBase
Serving queries at low latency using HBase
 
Multi-Tenant HBase Cluster - HBaseCon2018-final
Multi-Tenant HBase Cluster - HBaseCon2018-finalMulti-Tenant HBase Cluster - HBaseCon2018-final
Multi-Tenant HBase Cluster - HBaseCon2018-final
 
Cursor Implementation in Apache Phoenix
Cursor Implementation in Apache PhoenixCursor Implementation in Apache Phoenix
Cursor Implementation in Apache Phoenix
 
Hadoop security
Hadoop securityHadoop security
Hadoop security
 
Chef patterns
Chef patternsChef patterns
Chef patterns
 

Recently uploaded

Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 

Recently uploaded (20)

Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 

Websphere MQ (MQSeries) fundamentals

  • 2. Agenda Websphere MQ Introduction Websphere MQ Objects Websphere MQ Administration Basics Hands-on part 1 Distributed MQ Websphere MQ Clusters Hands-on part 2 Websphere MQ Programming Basics Hands-on part 3
  • 4. Messaging and Queuing Telephone answering machine Punched Cards and processing Clerical Data Input and processing Information Management Systems (IMS) Customer Information Control System (CICS) Telecommunications Access Methods (TCAM) Virtual Telecommunications Access Method
  • 5. Messaging and Queuing Messaging is an availability adaptation technique used for the transfer of information between two entities without regard for the immediate availability and accessibility of either Queuing a time adaptation technique user for saving information until the intended message receiver is ready to receive it Messaging and queuing is both asynchronous and connection less Note: entities can be program, persons, systems etc
  • 6. Requirements Distributed applications and systems Increase in program to program communication Heterogeneous Platforms Multiple communication protocols Maximize resource utilization Development complexity and resource skill set
  • 7. Websphere MQ (MQ Series until '02) IBM middleware for messaging & queuing Launched on MVS/ESA in 1992 Currently available on all major platforms Windows UNIX (AIXLinuxSun Solaris, HP-UX) AS/400 Z/OS Common API (MQI) on all platforms Supports multiple programming languages C, C++, JAVA, VB, COBOL,PL/1,Assembler Supports JMS standard APIs for messaging
  • 9. MQ Message String of bytes meaningful to the entity using it. Two parts to MQ messages Application Data Content and structure defined and understood by the application program Message Descriptor Contains control information like type of message and priority which are understood and used by MQ Default length is 4 MB; the max length is 100 MB Length can be restricted by the definition of MQ objects and the system storage Messages can be segmented or grouped
  • 10. MQ Messages Message Types (Functional) Datagram Request Reply Report Message Retention Types Persistent Non-persistent
  • 11. MQ Message Descriptor Version Message ID/Correlation ID Persistent/Non persistent Priority Date and time Life time of a message Coded Character Set Id Format Sender application and type Report options/Feedback Back out counter Segmentation/Grouping information
  • 12. MQ Object Types Queue manager Queue Process Definitions Channels Name lists System Default Objects Clusters Authentication Information Objects
  • 13. MQ Object Names Up to 48 characters for all objects except channels Up to 20 characters for channels Uppercase A- Z Lowercase a - z Numerics 0 - 9 Period (.) Underscore (_) Forward slash (/)* Percent sign (%)* Blanks are not allowed * - If used, names should be enclosed in double quotes since these are special characters
  • 14. Managing MQ Objects Control commands typed in through key board. MQSC commands through key board or from files Programmable Command Format (PCF) Messages MQ Administration Interface (MQAI) call from a program MQ Explorer snap-in and MQ services snap-in running under Microsoft management Console* * - Applicable to Windows platform only
  • 15. Message Queue Manager (MQM) Manages queues of messages for applications Provides application programming interface MQI Uses existing network facilities to transfer messages Coordinates database and queue data updates Segments messages and assembles them Allows message grouping and disassembling Can send message to more than one destination Provides administrative functions on objects Special events like triggers and instrumentation events are generated
  • 16. MQ Queues For Applications Local Queues Remote Queues Alias Queues Model Queues Dynamic Queues Used by MQ Initiation Queues Transmission Queues Cluster Transmission Queues Dead-letter Queues Command Queues Reply-to queues Event Queues
  • 17. Process definition Defines an application that starts in response to a trigger Attributes include application type, application ID (path) and data specific to the application
  • 18. Channels Logical communication link Communication path from one MQM to another Used to move messages between MQMs Shields applications from underlying protocols Message Channels connects two MQMs Uses Message Channel Agents (MCA) Unidirectional Requires a sender, receiver channels and a protocol MQI Channels connects MQ client to server Bidirectional Used for MQ calls and responses only
  • 19. Namelist Contains a list of MQ objects; queue, cluster, authinfo Typically used by trigger monitors to identify a group of queues Used in clustered environment to inform the availability of an MQ object to clusters Maintained independent of application and can be modified without stopping it Multiple applications can use a Namelist
  • 21. MQ Overview MQ Client Application MQPUT MQI Channel MQ Server (MQM1) MQI Channel Sender Channel Remote Q MQ Server (MQM2) Receiver Channel Local Q
  • 23. System Default Objects Object Name Description SYSTEM.ADMIN.CHANNEL.EVENT Event queue for channels SYSTEM.ADMIN.COMMAND.QUEUE Administration command queue. Used for remote MQSC commands and PCF commands. SYSTEM.ADMIN.PERFM.EVENT Event queue for performance events SYSTEM.ADMIN.QMGR.EVENT Event queue for queue manager events SYSTEM.AUTH.DATA.QUEUE The queue that holds access control lists for the queue manager. SYSTEM.CHANNEL.INITQ Channel initiation queue SYSTEM.CHANNEL.SYNCQ The queue that holds the synchronization data for channels. SYSTEM.CICS.INITIATION.QUEUE Default CICS initiation queue. SYSTEM.CLUSTER.COMMAND.QUEUE The queue used to carry messages to the repository queue manager. SYSTEM.CLUSTER.REPOSITORY.QUEUE The queue used to store all repository information SYSTEM.CLUSTER.TRANSMIT.QUEUE The transmission queue for all messages to all clusters SYSTEM.DEAD.LETTER.QUEUE Dead-letter (undelivered-message) queue.
  • 24. System Default Objects Object Name Description SYSTEM.DEFAULT.ALIAS.QUEUE Default alias queue SYSTEM.DEFAULT.INITIATION.QUEUE Default initiation queue SYSTEM.DEFAULT.LOCAL.QUEUE Default local queue SYSTEM.DEFAULT.MODEL.QUEUE Default model queue SYSTEM.DEFAULT.REMOTE.QUEUE Default remote queue SYSTEM.MQSC.REPLY.QUEUE MQSC command reply-to queue. This is a model queue. SYSTEM.PENDING.DATA.QUEUE Support deferred messages in JMS. SYSTEM.DEFAULT.NAMELIST Default namelist. SYSTEM.DEFAULT.PROCESS Default process definition.
  • 25. System Default Objects Object Name Description SYSTEM.DEFAULT.AUTHINFO. CRLLDAP Default authentication information object. SYSTEM.AUTO.RECEIVER Dynamic receiver channel. SYSTEM.AUTO.SVRCONN Dynamic server-connection channel. SYSTEM.DEF.CLUSRCVR Default receiver channel for the cluster SYSTEM.DEF.CLUSSDR Default sender channel for the cluster SYSTEM.DEF.RECEIVER Default receiver channel. SYSTEM.DEF.REQUESTER Default requester channel. SYSTEM.DEF.SENDER Default sender channel. SYSTEM.DEF.SERVER Default server channel. SYSTEM.DEF.SVRCONN Default server-connection channel. SYSTEM.DEF.CLNTCONN Default client-connection channel.
  • 27. Basic Administration* Define MQ Objects Display MQ Objects Alter MQ Objects Delete MQ Objects Miscellaneous * - Control Commands and MQSC Commands
  • 28. MQM Administration Create MQ Manager CRTMQM e.g. CRTMQM /q TESTQMGR /q – sets the MQM as default Start MQ Manager STRMQM e.g. STRMQM TESTQMGR Stop MQ Manager ENDMQM e.g. ENDMQM TESTQMGR Delete MQ Manager DLTMQM e.g. ENDMQM TESTQMGR
  • 29. MQM Administration Stop MQ Manager ENDMQM Options By default MQM is quiesced and so takes time -c to notifies all applications to stop but doesn't wait for MQM to end -c is same as issuing ENDMQM with no options -w waits until apps stop and MQM ends -i immediate and doesn't wait for apps to disconnect -p pre-emptive and should be used with caution
  • 30. Managing MQM Objects MQSC Commands by running RUNMQSC Verify a command without running it Run a command on a local queue manager Run a command on a remote queue manager To display MQM properties STRMQM TESTQMGR (if not started already) RUNMQSC or RUNMQSC TESTQMGR display QMGR (MQSC Command) END RUNMQSC can accept commands through key board or from a file RUNMQSC < command.in > execution.out
  • 31. Managing Queues Create a local queue DEFINE QLOCAL(TEST.LOCAL.QUEUE) Display a local queue DISPLAY QLOCAL(TEST.LOCAL.QUEUE) Alter a local queue ALTER QLOCAL(TEST.LOCAL.QUEUE) + GET(DISABLED) Delete a local queue DELETE QLOCAL(TEST.LOCAL.QUEUE) PURGE
  • 32. Managing Trigger Processes Create a Process DEFINE PROCESS(PROC1) REPLACE + DESCR('test proc') APPLTYPE(WINDOWS)+ APPLICID('c:testprog.exe') Display a Process DISPLAY PROCESS(PROC1) Alter a Process ALTER PROCESS(PROC1)USERDATA('12') Delete a Process DELETE PROCESS(PROC1)
  • 33. Enabling Triggers Enabling trigger in a queue DEFINE QLOCAL(TEST.LOCAL.QUEUE)REPLACE + TRIGGER TRIGTYPE(first)PROCESS(PROC1)+ INITQ(SYSTEM.DEFAULT.INITIATION.QUEUE) Trigger Types every first N messages
  • 34. Managing Channels Create a Channel DEFINE CHANNEL(MQMA.MQMB)CHLTYPE(sdr)+ XMITQ(MQMB) TRPTYPE(tcp)+ CONNAME(SERVER1.XYZ.COM) Display a Channel DISPLAY CHANNEL(MQMA.MQMB) Alter a Channel ALTER CHANNEL(MQMA.MQMB)+ CONNAME(SERVER2.XYZ.COM) Delete a Channel DELETE CHANNEL(MQMA.MQMB)
  • 35. Managing Namelist Create a Namelist DEFINE NAMELIST(CLUSTERNL)+ NAMES(CLUSA,CLUSB)+ NLTYPE(CLUSTER)REPLACE Display a Namelist DISPLAY NAMELIST(CLUSTERNL) Alter a Namelist DEFINE NAMELIST(CLUSTERNL)+ NAMES(CLUSA,CLUSB,CLUSC)+ NLTYPE(CLUSTER) Delete a Namelist DELETE NAMELIST(CLUSTERNL)
  • 36. Hands-on Part 1 MQ Administration
  • 38. Distributed MQ Transferring messages between Queue Managers Queue Managers can be on the same machine or world apart Queue Managers can be on the same platform or hetrogenous platforms Implemented using Distributed Queue Management (DQM) features of MQ including MQ Clusters
  • 39. Distributed MQ Components Local and remote Queue Managers and queues Local is one to which an application is connected Remote queue definition Local definition of a queue in a remote MQM Transmission Queues Special local queue to store message temporarily before transmitting to remote destination Message channel agents (MCA) Software that handles sending and receiving Channels One way communication link between MQMs
  • 40. Distributed MQ Components Dead letter queue Special queue to store undelivered messages Transport Service Communication protocol independent of MQ MQ supports multiple protocols Platform dependent Channel Initiators and Listeners Initiators are trigger monitors for sender channels Listeners start receiver channels on receiving request from the sender MCA Channel Exit Programs Used for additional processing like encryption
  • 41. Distributed MQ Components M C A M C A M C A M C A Channel Channel Transport Service (TCP) Transport Service (TCP) App Q App Q App Q App Q XMIT Q XMIT Q QM1 QM2 Channel Initiator Listener Init Q
  • 42. Sample DQM Definition1 CHAD – Channel Auto Definition
  • 43. Sample DQM Definition On QMA Define QREMOTE(Q1)+ RNAME(Q1)+ RQMNAME(QMB)+ XMITQ(QMB) DEFINE QLOCAL(QMB)+ USAGE(XMITQ) DEFINE CHANNEL(A.B)+ CHLTYPE(sdr)+ XMITQ(QMB)+ TRPTYPE(tcp)+ CONNAME(SERVERB.COM) DEFINE QLOCAL(Q2) DEFINE CHANNEL(B.A)+ CHLTYPE(rcvr)+ TRPTYPE(tcp) On QMB DEFINE QLOCAL(Q1) DEFINE CHANNEL(A.B)+ CHLTYPE(rcvr)+ TRPTYPE(tcp) Define QREMOTE(Q2)+ RNAME(Q2)+ RQMNAME(QMA)+ XMITQ(QMA) DEFINE QLOCAL(QMA)+ USAGE(XMITQ) DEFINE CHANNEL(B.A)+ CHLTYPE(sdr)+ XMITQ(QMA)+ TRPTYPE(tcp)+ CONNAME(SERVERA.COM)
  • 44. Channel Types & Combinations Channel Types Sender Receiver Server Requester Cluster Sender Cluster Receiver Valid Combinations Sender - Receiver Requester - Server Requester - Sender Server - Receiver Cluster Sender – Cluster Receiver
  • 45. Queue Addressing & Aliases Queue Name + Queue Manager Name + Transmission Queue (if remote queue) Remote Queue Definition Resolves the remote queue location Queue Manager Alias Definition Specifies alternative names for the message descriptor of a “send” message Reply-to Queue Alias Definition Specifies alternative names for the reply information in the message descriptor Aliases are characterized by a blank RNAME in the remote queue definition
  • 46. Remote Queue Definition Remote Queue Definition Define QREMOTE(Q1)RNAME(Q1)+ RQMNAME(QMB)XMITQ(QMB) Resolves the remote queue address using the remote queue manager, remote queue name and the transmission queue If the transmission queue is not specified, a transmission queue with the name of the remote queue manager will be used If not available, the default transmission queue of the queue manager will be used
  • 47. Queue Manager Alias Queue Manager Alias Define QREMOTE(QMB_Test)RNAME()+ RQMNAME(QMB) Define QREMOTE(QMB_Test)RNAME()+ RQMNAME(QMB)XMITQ(QMC) Messages with MQM QMB_Test in the descriptor will be modified to QMB before being forwarded XMITQ parameter can be used to steer the message to use a specified channel If transmission queue is not specified, the logic detailed in the previous slide will be used
  • 48. Reply-to Queue Alias Can be used to alter the reply-to queue and queue manager without changing the application At the sender queue manager Define QREMOTE(QMA_Reply) + RNAME(Answer_QMA)RQMNAME(QMA_Return) Define QREMOTE(QMA_Return)RNAME()+ RQMNAME(QMA) In “PUT” call leave the “reply to queue manager” blank and set the queue name to QMA_Reply At the replying queue manager Define QLOCAL(QMA_Return)USAGE(XMITQ)
  • 49. Reaching Remote Queue Managers Point to point Multi-hopping Using shared channels Using multiple channels Using MQ clusters
  • 50. DMQ Commands Start Channel Initiators RUNMQCHI -q IQ (Control Command) START CHINIT INITQ(IQ) (MQSC Command) Stopping Channel Initiators Alter the init queue to disable GET from queue Start MQM Listeners RUNMQLSR -t TCP -m MQM-p 1414 (control Command)* START LISTENER IPADDR(X.X.X.X) PORT(nnnn) TRPTYPE(tcp) (MQSC Command) *-This requires editing of /etc/services and /etc/inetd.conf files to add MQSeries 1414/tcp #MQ Listener MQSeries stream tcp nowait mqm /usr/mqm/bin/amqcrsta -q mqm.name
  • 51. DMQ Commands Stop MQM Listeners ENDMQLSR -m MQM (control Command) STOP LISTENER IPADDR(X.X.X.X) PORT(nnnn) TRPTYPE(tcp) (MQSC Command) Start MQ Channel RUNMQCHL -c CHANNEL -m QM (Control Command) START CHANNEL(channel-name) (MQSC Command) Stop MQ Channel STOP CHANNEL(channel-name) (MQSC Command) Display MQ Channel Status DISPLAY CHSTATUS(channel-name) (MQSC Command)
  • 52. DMQ Commands To test a channel PING CHANNEL(channel-name) (MQSC Command)
  • 54. DQM vs Clusters DQM Components Local MQM Remote Q definition Xmit Q definition Sender Channel Remote MQM Local Q Receiver Channel Listener Cluster Definitions Local MQM Cluster receiver channl Cluster sender channel Remote MQM Cluster receiver channl Cluster sender channel
  • 55. Cluster Advantages Reduced system administration due to reduced number of definitions Increased availability and scalability due to easy administration and multiple instances of queues Work load balancing using multiple instances of queues
  • 56. Cluster Component Details MQ Cluster is a network of logically related MQMs and need to be unique in an enterprise Cluster Queue Manager is a MQM that is a member of a MQ Cluster and should be unique in the cluster Cluster Queue is a queue hosted in a cluster queue manager and is available to all MQM in a cluster Repository is a collection of information about the queue managers that are part of a cluster Full Repository is one which stores a complete set of information about all MQMs in the cluster Partial Repository is one which stores information which is required to deal with interested MQMs
  • 57. Cluster Component Details Repository Queue manager is a cluster queue manager which stores a full repository SYSTEM.CLUSTER.REPOSITORY.QUEUE Cluster Receiver Channel is the receiving end of a channel on which cluster MQMs can receive messages from other MQMs in the cluster Cluster Sender Channel is the sending end of a channel on which cluster MQMs can send cluster information to one of the full repositories Cluster Transmission Queue transmits all messages from a cluster MQM to any MQM in the cluster SYSTEM.CLUSTER.TRANSMIT.QUEUE Command Queue is used to make requests and get responses from full repositories
  • 58. Clustered MQ Components Cluster Receiver Channel Cluster Receiver Channel Transport Service (TCP) Transport Service (TCP) App Q App Q1 App Q App Q1 XMIT Q QM1 QM2 Full Repository Full Repository Cluster Sender Channel Cluster - CLUA XMIT Q
  • 59. Cluster Definition On QM1 RUNMQSC ALTER QMGR REPOS(CLUA) DEFINE CHANNEL(TO.QM1)+ CHLTYPE(CLUSRCVR)+ TRPTYPE(tcp)+ CONNAME(QM1.COM)+ CLUSTER(CLUA) DEFINE CHANNEL(TO.QM2)+ CHLTYPE(CLUSSDR)+ TRPTYPE(tcp)+ CONNAME(QM2.COM)+ CLUSTER(CLUA) DEFINE QLOCAL(Q1)+ CLUSTER(CLUA) On QM2 RUNMQSC ALTER QMGR REPOS(CLUA) DEFINE CHANNEL(TO.QM2)+ CHLTYPE(CLUSRCVR)+ TRPTYPE(tcp)+ CONNAME(QM1.COM)+ CLUSTER(CLUA) DEFINE CHANNEL(TO.QM1)+ CHLTYPE(CLUSSDR)+ TRPTYPE(tcp)+ CONNAME(QM1.COM)+ CLUSTER(CLUA) DEFINE QLOCAL(Q)+ CLUSTER(CLUA)
  • 60. Adding new QM (QM3) to Cluster RUNMQSC DEFINE CHANNEL(TO.QM3)+ CHLTYPE(CLUSRCVR)+ TRPTYPE(tcp)+ CONNAME(QM3.COM)+ CLUSTER(CLUA) DEFINE CHANNEL(TO.QM1)+ CHLTYPE(CLUSSDR)+ TRPTYPE(tcp)+ CONNAME(QM1.COM)+ CLUSTER(CLUA) Note: QM3 doesn't store a full repository and points to QM1 repository
  • 61. Adding new QM on DHCP to Cluster RUNMQSC DEFINE CHANNEL(TO.QM3)+ CHLTYPE(CLUSRCVR)+ TRPTYPE(tcp)+ CONNAME('')+ CLUSTER(CLUA) DEFINE CHANNEL(TO.+QMNAME+)+ CHLTYPE(CLUSSDR)+ TRPTYPE(tcp)+ CONNAME(QM2.COM)+ CLUSTER(CLUA) Note: the channel definition TO.+QMNAME+ will be replaced by TO.QM2
  • 62. Verifying a Cluster Each MQM require a channel initiator to monitor the system defined init Q SYSTEM.CHANNEL.INITQ START CHINIT Each MQM require a channel listener to listen to incoming network requests START LISTENER PORT(1414)+ TRPTYPE(TCP) Verify all the available MQMs in the cluster DISPLAY CLUSQMGR(*) Verify all the channel statuses DISPLAY CHSTATUS(*)
  • 63. Load Balancing Using Cluster Define the same queue in multiple queue managers in the cluster MQ series will use the default algorithm (round robin) to identify MQM and transfer message Default algorithm can be changed using the cluster workload user exit
  • 64. Hands-on Part 2 Creating MQ Clusters
  • 66. Messaging and Queuing Patterns One to one One to many Many to one Publish/Subscribe Request/reply One-way datagram or send-and-forget
  • 67. One to One Pattern 1
  • 68. One to Many Pattern 1
  • 69. Many to One Pattern 1
  • 72. Send and Forget Pattern1 (Datagram)
  • 73. Transaction Management ACID unit of work Single phase commit Two phase commit with XA specification compliant resource managers BackoutCount and BackoutThreshold attributes to avoid looping
  • 74. Message Queuing Interface (MQI) Call Purpose MQCONN Connect to a Queue Manager MQDISC Disconnect from a Queue Manager MQOPEN Open a specific Queue MQCLOSE Close a Queue MQPUT Put a message on a queue MQGET Get a message from a queue MQPUT1 MQOPEN + MQPUT + MQCLOSE MQINQ Inquire Properties of an object MQSET Set properties of an object MQCONNX Standard or fast path bindings MQBEGIN Begin an unit of work MQCMIT Commit an unit of work MQBACK Back out to the start of unit of work
  • 75. MQI Data Structures Name Purpose MQBO Specifies options for MQBEGIN call MQCNO Specifies options for MQCONNX call MQDH Describes the data in a distribution-list message MQGMO Specifies options for MQGET call MQMD Message descriptor details to control message in a MQGET or MQPUT call MQOD Object descriptor which is required in a MQOPEN call MQOR Object record identifies the destinations to work with in a distribution list MQPMO Specifies options for MQPUT call
  • 76. MQ Programming Sequence MQCONN MQOPEN BASIC OP MQCLOSE MQDISC Connect to MQM Open MQ Objects Perform n operations Close MQ Objects Disconnect from MQM
  • 78. JAVA Programming Environment Required jar file com.ibm.mq.jar Normally found in the MQ installation directory Environment variable set-up Add com.ibm.mq.jar to the classpath CLASSPATH=install_dirlibcom.ibm.mq.jar install_dir is platform dependent Import required package in the code Import com.ibm.mq.*;
  • 79. Connection Modes Connection Modes Binding Mode Client Connection Mode
  • 80. MQ Series JAVA Classes MQEnvironment Contains the static variables that control the environment in which a MQQueueManager is constructed MQQueueManager Represents the MQ series queue manager MQQueue Provides inquiry, set,put,get operations for queues MQMessage Represents the descriptor and data of a MQ message MQPutOptions Contains options which control MQQueue.put() method MQGetOptions Contains options which control MQQueue.get() method MQException Contains completion codes and error code constants
  • 81. Setting up the Connection MQEnvironment.hostname=“TEST.SERVER.COM” MQEnvironment.channel=“TEST.CLIENT.CHNL” MQEnvironment.port=1638 MQEnvironment.userId=”userABC” MQEnvironment.password=”password” MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY,MQC.TRANSPORT_MQSERIES) MQQueueManager qMgr = new MQQueueManager(“TEST”);
  • 82. Interacting with Queues - Put Int openOptions = MQC.MQOO_OUTPUT|MQC.MQOO_FAIL_IF_QUIESCING; MQQueue queue = qMgr.accessQueue(“TestQ”,openOptions); MQPutMessageOptions pmo = new MQPutMessageOptions(); MQMessage outMsg = new MQMessage(); outMsg.format = MQC.MQFMT_STRING; String msgString = “Test message”; outMsg.writeString(msgString); queue.put(outMsg,pmo);
  • 83. Interacting with Queues - Get Int openOptions = MQC.MQOO_INPUT_SHARED|MQC.MQOO_FAIL_IF_QUIESCING; MQQueue queue = qMgr.accessQueue(“TestQ”,openOptions); MQGetMessageOptions gmo = new MQGetMessageOptions(); gmo.options = gmo.options + MQC.MQGMO_SYNCPOINT; gmo.options = gmo.options + MQC.MQGMO_WAIT; gmo.waitInterval = 3000; MQMessage inMsg = new MQMessage(); queue.put(inMsg,gmo);
  • 84. Closing the Connection qMgr.commit(); queue.close(); qMgr.disconnect();
  • 85. Hands-on Part 3 MQ Programming
  • 87. Security Services Identification and Authentication Access Control Confidentiality Data Integrity Non repudiation Managing security is more concerned with managing risk to a level that is acceptable to the business.
  • 88. Security Mechanism Access Control Lists Cryptography Digital Signatures
  • 89. Security Terminology & Concepts Cryptography Message Digests Digital Signatures Digital Certificates Certification Authorities Public Key Infrastructure (PKI) Secure Sockets Layer (SSL)
  • 90. Cryptography Concept Convert plain text to ciphertext called encryption Transmit ciphertext to receiver Convert ciphertext to plain text called decryption Symmetric algorithms share same key and involves key distribution problem Asymmetric algorithms use different keys; Public Key Cryptography Strength of encryption determined by key size; 512 bits, 768 bits, 1024 bits Encryption algorithms can be on data blocks or on each byte of data
  • 91. Message Digest Concept Fixed size numeric representation of contents of message Computed by hash function which is one way No two different message will have the same value Also called Message Authentication Code (MAC) Message digest is sent along with the message Receiver generates a digest and compares with what was received
  • 92. Digital Signatures Concept Formed by encrypting a representation of message Encryption done using the private key of the signatory Normally done on the message digest for efficiency Digital Signature sent along with the message Receiver retrieves the message digest using the public key of the signatory Computes the digest from the message received and the compares against the digest retrieved Can involve man in the middle attack with public key distribution
  • 93. Digital Certificates Concept Binds public key to a owner and prevents impersonation Also known as public key certificates Involves trusted third party called Certification Authority Digital Certificates include Owner's public key Owner's distinguished name: CN,O,OU,L,ST,C Distinguished name of the issuer Date from which the certificate is valid Expiry date of the certificate Version number Serial number Need to make a request and receive digital certificate from a CA
  • 94. Digital Certificates Concept Binds public key to a owner and prevents impersonation Involves trusted third party called Certification Authority Also known as public key certificates Digital Certificates include Owner's public key Owner's distinguished name: CN,O,OU,L,ST,C Distinguished name of the issuer Date from which the certificate is valid Expiry date of the certificate Version number Serial number Need to make a request and receive certificate from a CA
  • 95. Public Key Infrastructure (PKI) System of facilities, policies and services that support the use of Public Key Cryptography Typically involves Certification Authorities (CA) and Registration Authorities (RA) which does Issuing digital certificates Validation digital certificates Revoking digital certificates Distribution public keys RA does the verification of information provided in the request for certificate to CA
  • 97. MQ Security Considerations Authority to administer Websphere MQ Authority to work with Websphere MQ objects Channel Security MQ Clusters MQ Publish/Subscribe MQ Internet Pass-Thru Link level security Application level security
  • 98. MQ Security Options MQM can verify the administration authority MQM can verify the authority to access objects MCA can authenticate a partner MCA Messages can be encrypted before sending and decrypted when receiving User-id in the message descriptor can be used to verify the authority to access MQM objects COA and COD report options to implement non- repudiation functions in an application
  • 100. MQ Framework Components Trigger Monitor Interface Message Channel Interface Name Service Interface Security Enabling Interface Data Conversion Interface
  • 102. MQ Performance Improvement Use MQCONNX with fastpath binding option The application should be trusted Use MQCONNX to create thread independent connection