SlideShare ist ein Scribd-Unternehmen logo
1 von 4
Downloaden Sie, um offline zu lesen
IBM WebSphere MQ (MQ Series) in a Nutshell

                            (Prepared by Channu Kambalyal)

Introduction
   •   MQ Series is a Middleware for Commercial Messaging and Queuing
   •   MQ Series API – also called Message Queue Interface (MQI) used to communicate with
       a Message Queue Manager (MQM), the runtime program of MQSeries.
   •   MQI consists of 13 calls.

Messages
   •   Consists of 2 parts: Message Descriptor and Message Data
   •   Message descriptor identifies message id and contains control information such as
       message type, expiry time, correlation ID, priority, reply queue name.
   •   MQ Series Version 5 supports maximum message length of 100 MB
   •   Messages can be segmented or grouped. If permitted queue manager segments a large
       message when it does not fit in a queue. Application has the option to receive entire
       message in piece or each segment separately. Application can also control the logical
       boundaries or buffer size of the segment of a message. Queue Manager ensures that the
       order of the segment is maintained.
   •   Several small messages can be grouped to build one larger physical message.
   •   Using a Distribution List, you can send a message to more than one destination.
       Distribution List is a file contains a list of queue names and queue managers that own
       them. Receiving Queue Manager replicates the messages and puts them into destination
       queues (This function is called late fan-out).
   •   MQ Series knows 4 types of massages: Datagram (unsolicited message), Request (a
       message for which response is expected), Reply and Report (an event such as
       occurrence of an error or confirmation on arrival or delivery)
   •   MQ Series messages can be persistent and non-persistent.
   •   Message Descriptor contains: Version, Message ID/Correlation ID, Persistent/ Non-
       Persistent, Priority, Date &m Time, Lifetime of a message, Return Address, Format,
       Sender Application and Type, Report options/ Feedback (COA, COD), Back out counter,
       Segmenting/ Grouping Information.

Queue Manager (MQM)
   •   Manages queues and messages for applications
   •   Transfers messages to other Queue Managers via channels using existing network
       facilities.
   •   It refers to objects that are defined by the administrator.
   •   Coordinates updates to databases and queues using two-phase commit.
   •   Gets and puts from/to queues are committed together with SQL updates, or backed out if
       necessary.
   •   Segments messages, if necessary, and assembles them.
   •   Can group messages and send them as one physical message to their destination,
       where they are automatically disassembled.
   •   Can send one message to more than one destination using a user-defined dynamic
       destination list.
   •   Allow administrators to create and delete queues, alter properties of existing queues,
       control the operation of queue manager.
   •   MQ Series for Windows NT version 5.1 provides GUI to administer.
   •   MQ Series for Windows (different from NT) is a single-user queue manager and is not
       intended to function as a queue manager for other MQ Series clients.




                                                                                    Page 1 of 4
Queue Manager Clusters
   •   MQSeries for MVS/ESA and Version 5.1 for distributed platforms, provides clustering
       features
   •   Queue Managers that form a cluster can run in the same machine or in different
       machines on different platforms.
   •   Two of Queue Managers maintain a repository that contains information about all queue
       managers and queues in the cluster (full repository). Other Queue Managers maintain
       only a repository of the objects they are interested in (partial repository).
   •   Queue Managers use special cluster channels to exchange information.
   •   Client application may specify a queue manager and direct the message to a specific
       queue in a cluster or it may let a queue manager to determine where the queue is and to
       which one to send the message.
   •   Client uses a Transmission Queue on its machine and destination queue is called “Target
       Queue”.
   •   Administrator must define the name of the cluster, when a queue is defined.
   •   MQSeries distributes the messages round robin.

Queue Manager Objects
  • A Queue Manager uses 3 types of objects, namely, Queues, Process Definitions and
       Channels.
   •   Queues are used to store messages.
   •   Process Definition object defines an application to a queue manager. It contains a name
       of a program (and its path) to be triggered when a message arrives for it.
   •   Channel is a communication link. There are 2 kinds of channels, namely, Message
       Channels and MQI channels.
   •   Message Channel connects 2 queue managers via Message Channel Agents (MCA).
       Message Channel is unidirectional.
   •   MCA is a program (also called mover) that transfers messages from a transmission
       queue to a communication link and from communication link to a target queue.
   •   MQI channel connects MQSeries client to a queue manager and is bi-directional.
   •   Message Channel can run at 2 speeds: fast and normal. Fast Channels improve
       performance but messages can be lost in case of channel failure.

Message Queues
  • Message Queues belong to Queue Manager.
  • Types of Messages Queues are:
         o Local Queue – is a real queue!
         o Cluster Queue – is a local queue that is known throughout a cluster of queue
                managers.
           o    Remote Queue – structure describing a queue hosted by a different queue
                manager.
           o Transmission Queue – a local queue used for messages to be sent to a remote
                queue.
           o Initiation Queue – local queue with a special purpose
           o Dynamic Queue – local queue created on the fly
           o Alias Queue - - if you do not like the queue name
           o Dead-Letter Queue – one for each queue manager
           o Reply-to Queue – specified in request message
           o Model Queue – model for local queues
           o Repository Queue – hold cluster information
   •   Create a queue manager using the command: crtmqm. Example:
           o Crtmqm /q /u system.dead.letter.queue MYQMGR
   •   To start a queue manager issue command: strmqm



                                                                                      Page 2 of 4
Manipulating Queue manager Objects
   •      Use the utility RUNMQSC to manipulate queue manager objects. Ensure queue manager
          is started prior using the runmqsc utility. Example:
                            C:strmqm
                            runmqsc
                                    define qlocal(‘QUEUE1’) replace descry (‘test queue’)
                                    alter qmgr deadq(system.dead.letter.queue)
                                    end

How MQSeries Works

Following diagram depicts how MQSeries works:


                                                Figure: How MQSeries Works



   Program 1                                                                                          Program 2         Starts
                                                      MQM A             MQM B


       MQPUT
                                  Channel Initiator                                  Listener
                                                                                                                    Trigger Monitor
                                 (Must be running)                               (Must be running)
                                                                                                                   (Must be running)
                 Monitors                                                       (Default port 1414)

     Remote Q                          Starts                                                           MQGET
                                                                                      Starts
                                                                                                                        Monitors


                                MQSeries Channel                                MQSeries Channel
                                    Agent                                           Agent
                Ch Init Q           (MCA)                                           (MCA)                              System
                                                                                                                        Init Q

                                       Moves                                          Moves

       Xmit Q                                                 Network                                  Local Q




   MQM A - Detect message destined for                                               MCA - Moves messages to a local Q and to
remote Q moves it to xmit Q and a Ch init Q                                                      System Init Q




Communication between Queue managers

How to Trigger Applications


Message Queuing Interface

                            MQCONN              Connect to a Queue Manager
                            MQDISC              Disconnect from a Queue Manager
                            MQOPEN              Open a specific queue
                            MQCLOSE             Close a queue
                            MQPUT               Put message on a queue
                            MQPUT1              Get message from a queue
                            MQGET               MQOPEN + MQPUT + MQCLOSE
                            MQINQ               Inquire properties of an object



                                                                                                                        Page 3 of 4
MQSET     Set properties of an object
MQCONNX   Standard or fast path bindings
MQBEGIN   Begin a unit of work (database coordination)
MQCMIT    Commit a unit of work
MQBACK    Back out




                                                         Page 4 of 4

Weitere ähnliche Inhalte

Was ist angesagt?

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
 
3429 How to transform your messaging environment to a secure messaging envi...
3429   How to transform your messaging environment to a secure messaging envi...3429   How to transform your messaging environment to a secure messaging envi...
3429 How to transform your messaging environment to a secure messaging envi...Robert Parker
 
What's New in IBM Messaging
What's New in IBM MessagingWhat's New in IBM Messaging
What's New in IBM MessagingMorag Hughson
 
WebSphere MQ V7 API Enhancements
WebSphere MQ V7 API EnhancementsWebSphere MQ V7 API Enhancements
WebSphere MQ V7 API EnhancementsMorag Hughson
 
IBM MQ - Comparing Distributed and z/OS platforms
IBM MQ - Comparing Distributed and z/OS platformsIBM MQ - Comparing Distributed and z/OS platforms
IBM MQ - Comparing Distributed and z/OS platformsMarkTaylorIBM
 
MQ Security Overview
MQ Security OverviewMQ Security Overview
MQ Security OverviewMarkTaylorIBM
 
IBM MQ Channel Authentication
IBM MQ Channel AuthenticationIBM MQ Channel Authentication
IBM MQ Channel AuthenticationIBM Systems UKI
 
HHM-3481: IBM MQ for z/OS: Enhancing Application and Messaging Connectivity ...
 HHM-3481: IBM MQ for z/OS: Enhancing Application and Messaging Connectivity ... HHM-3481: IBM MQ for z/OS: Enhancing Application and Messaging Connectivity ...
HHM-3481: IBM MQ for z/OS: Enhancing Application and Messaging Connectivity ...Matt Leming
 
Where is My Message
Where is My MessageWhere is My Message
Where is My MessageMatt Leming
 
MSMQ - Microsoft Message Queueing
MSMQ - Microsoft Message QueueingMSMQ - Microsoft Message Queueing
MSMQ - Microsoft Message QueueingPeter R. Egli
 
Where is my MQ message on z/OS?
Where is my MQ message on z/OS?Where is my MQ message on z/OS?
Where is my MQ message on z/OS?Matt Leming
 
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
 
Message Queuing (MSMQ)
Message Queuing (MSMQ)Message Queuing (MSMQ)
Message Queuing (MSMQ)Senior Dev
 
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
 
MQ What's New Beyond V8 - V8003 level
MQ What's New Beyond V8 - V8003 levelMQ What's New Beyond V8 - V8003 level
MQ What's New Beyond V8 - V8003 levelMarkTaylorIBM
 
IBM MQ - Monitoring and Managing Hybrid Messaging Environments
IBM MQ - Monitoring and Managing Hybrid Messaging EnvironmentsIBM MQ - Monitoring and Managing Hybrid Messaging Environments
IBM MQ - Monitoring and Managing Hybrid Messaging EnvironmentsMarkTaylorIBM
 
WebSphere MQ CHLAUTH - including V8 changes
WebSphere MQ CHLAUTH - including V8 changesWebSphere MQ CHLAUTH - including V8 changes
WebSphere MQ CHLAUTH - including V8 changesMorag Hughson
 
REST APIs and MQ
REST APIs and MQREST APIs and MQ
REST APIs and MQMatt Leming
 

Was ist angesagt? (20)

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...
 
3429 How to transform your messaging environment to a secure messaging envi...
3429   How to transform your messaging environment to a secure messaging envi...3429   How to transform your messaging environment to a secure messaging envi...
3429 How to transform your messaging environment to a secure messaging envi...
 
WebSphere MQ tutorial
WebSphere MQ tutorialWebSphere MQ tutorial
WebSphere MQ tutorial
 
What's New in IBM Messaging
What's New in IBM MessagingWhat's New in IBM Messaging
What's New in IBM Messaging
 
WebSphere MQ V7 API Enhancements
WebSphere MQ V7 API EnhancementsWebSphere MQ V7 API Enhancements
WebSphere MQ V7 API Enhancements
 
IBM MQ Series For ZOS
IBM MQ Series For ZOSIBM MQ Series For ZOS
IBM MQ Series For ZOS
 
IBM MQ - Comparing Distributed and z/OS platforms
IBM MQ - Comparing Distributed and z/OS platformsIBM MQ - Comparing Distributed and z/OS platforms
IBM MQ - Comparing Distributed and z/OS platforms
 
MQ Security Overview
MQ Security OverviewMQ Security Overview
MQ Security Overview
 
IBM MQ Channel Authentication
IBM MQ Channel AuthenticationIBM MQ Channel Authentication
IBM MQ Channel Authentication
 
HHM-3481: IBM MQ for z/OS: Enhancing Application and Messaging Connectivity ...
 HHM-3481: IBM MQ for z/OS: Enhancing Application and Messaging Connectivity ... HHM-3481: IBM MQ for z/OS: Enhancing Application and Messaging Connectivity ...
HHM-3481: IBM MQ for z/OS: Enhancing Application and Messaging Connectivity ...
 
Where is My Message
Where is My MessageWhere is My Message
Where is My Message
 
MSMQ - Microsoft Message Queueing
MSMQ - Microsoft Message QueueingMSMQ - Microsoft Message Queueing
MSMQ - Microsoft Message Queueing
 
Where is my MQ message on z/OS?
Where is my MQ message on z/OS?Where is my MQ message on z/OS?
Where is my MQ message on z/OS?
 
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
 
Message Queuing (MSMQ)
Message Queuing (MSMQ)Message Queuing (MSMQ)
Message Queuing (MSMQ)
 
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
 
MQ What's New Beyond V8 - V8003 level
MQ What's New Beyond V8 - V8003 levelMQ What's New Beyond V8 - V8003 level
MQ What's New Beyond V8 - V8003 level
 
IBM MQ - Monitoring and Managing Hybrid Messaging Environments
IBM MQ - Monitoring and Managing Hybrid Messaging EnvironmentsIBM MQ - Monitoring and Managing Hybrid Messaging Environments
IBM MQ - Monitoring and Managing Hybrid Messaging Environments
 
WebSphere MQ CHLAUTH - including V8 changes
WebSphere MQ CHLAUTH - including V8 changesWebSphere MQ CHLAUTH - including V8 changes
WebSphere MQ CHLAUTH - including V8 changes
 
REST APIs and MQ
REST APIs and MQREST APIs and MQ
REST APIs and MQ
 

Ähnlich wie Ibm websphere mq

Hhm 3479 mq clustering and shared queues for high availability
Hhm 3479 mq clustering and shared queues for high availabilityHhm 3479 mq clustering and shared queues for high availability
Hhm 3479 mq clustering and shared queues for high availabilityPete Siddall
 
RabbitMQ interview Questions and Answers
RabbitMQ interview Questions and AnswersRabbitMQ interview Questions and Answers
RabbitMQ interview Questions and Answersjeetendra mandal
 
WebSphere MQ Admin Classroom Training
WebSphere MQ Admin Classroom TrainingWebSphere MQ Admin Classroom Training
WebSphere MQ Admin Classroom TrainingSrihitha Technologies
 
The RabbitMQ Message Broker
The RabbitMQ Message BrokerThe RabbitMQ Message Broker
The RabbitMQ Message BrokerMartin Toshev
 
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
 
Bhupal_IBM MQ
Bhupal_IBM MQBhupal_IBM MQ
Bhupal_IBM MQbhupal m
 
Switching and multicast schemes in asynchronous transfer mode networks
Switching and multicast schemes in asynchronous transfer mode networksSwitching and multicast schemes in asynchronous transfer mode networks
Switching and multicast schemes in asynchronous transfer mode networksEditor Jacotech
 
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
 
3450 - Writing and optimising applications for performance in a hybrid messag...
3450 - Writing and optimising applications for performance in a hybrid messag...3450 - Writing and optimising applications for performance in a hybrid messag...
3450 - Writing and optimising applications for performance in a hybrid messag...Timothy McCormick
 
Message queues
Message queuesMessage queues
Message queuesMax Bodnar
 
Openstack Basic with Neutron
Openstack Basic with NeutronOpenstack Basic with Neutron
Openstack Basic with NeutronKwonSun Bae
 
quickguide-einnovator-3-rabbitmq
quickguide-einnovator-3-rabbitmqquickguide-einnovator-3-rabbitmq
quickguide-einnovator-3-rabbitmqjorgesimao71
 
Mumbai MuleSoft Meetup #20
Mumbai MuleSoft Meetup #20Mumbai MuleSoft Meetup #20
Mumbai MuleSoft Meetup #20Akshata Sawant
 
Introduction to EMQ X Enterprise
Introduction to EMQ X EnterpriseIntroduction to EMQ X Enterprise
Introduction to EMQ X EnterpriseEMQ
 
[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging QueuesNaukri.com
 
IBM MQ Clustering (2017 version)
IBM MQ Clustering (2017 version)IBM MQ Clustering (2017 version)
IBM MQ Clustering (2017 version)MarkTaylorIBM
 

Ähnlich wie Ibm websphere mq (20)

IBM MQ Basics
IBM MQ BasicsIBM MQ Basics
IBM MQ Basics
 
Hhm 3479 mq clustering and shared queues for high availability
Hhm 3479 mq clustering and shared queues for high availabilityHhm 3479 mq clustering and shared queues for high availability
Hhm 3479 mq clustering and shared queues for high availability
 
WMQ, WMB and EIP
WMQ, WMB and EIPWMQ, WMB and EIP
WMQ, WMB and EIP
 
RabbitMQ interview Questions and Answers
RabbitMQ interview Questions and AnswersRabbitMQ interview Questions and Answers
RabbitMQ interview Questions and Answers
 
Ibm mq
Ibm mqIbm mq
Ibm mq
 
WebSphere MQ Admin Classroom Training
WebSphere MQ Admin Classroom TrainingWebSphere MQ Admin Classroom Training
WebSphere MQ Admin Classroom Training
 
The RabbitMQ Message Broker
The RabbitMQ Message BrokerThe RabbitMQ Message Broker
The RabbitMQ Message Broker
 
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
 
Bhupal_IBM MQ
Bhupal_IBM MQBhupal_IBM MQ
Bhupal_IBM MQ
 
Switching and multicast schemes in asynchronous transfer mode networks
Switching and multicast schemes in asynchronous transfer mode networksSwitching and multicast schemes in asynchronous transfer mode networks
Switching and multicast schemes in asynchronous transfer mode networks
 
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
 
3450 - Writing and optimising applications for performance in a hybrid messag...
3450 - Writing and optimising applications for performance in a hybrid messag...3450 - Writing and optimising applications for performance in a hybrid messag...
3450 - Writing and optimising applications for performance in a hybrid messag...
 
Spring RabbitMQ
Spring RabbitMQSpring RabbitMQ
Spring RabbitMQ
 
Message queues
Message queuesMessage queues
Message queues
 
Openstack Basic with Neutron
Openstack Basic with NeutronOpenstack Basic with Neutron
Openstack Basic with Neutron
 
quickguide-einnovator-3-rabbitmq
quickguide-einnovator-3-rabbitmqquickguide-einnovator-3-rabbitmq
quickguide-einnovator-3-rabbitmq
 
Mumbai MuleSoft Meetup #20
Mumbai MuleSoft Meetup #20Mumbai MuleSoft Meetup #20
Mumbai MuleSoft Meetup #20
 
Introduction to EMQ X Enterprise
Introduction to EMQ X EnterpriseIntroduction to EMQ X Enterprise
Introduction to EMQ X Enterprise
 
[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues
 
IBM MQ Clustering (2017 version)
IBM MQ Clustering (2017 version)IBM MQ Clustering (2017 version)
IBM MQ Clustering (2017 version)
 

Ibm websphere mq

  • 1. IBM WebSphere MQ (MQ Series) in a Nutshell (Prepared by Channu Kambalyal) Introduction • MQ Series is a Middleware for Commercial Messaging and Queuing • MQ Series API – also called Message Queue Interface (MQI) used to communicate with a Message Queue Manager (MQM), the runtime program of MQSeries. • MQI consists of 13 calls. Messages • Consists of 2 parts: Message Descriptor and Message Data • Message descriptor identifies message id and contains control information such as message type, expiry time, correlation ID, priority, reply queue name. • MQ Series Version 5 supports maximum message length of 100 MB • Messages can be segmented or grouped. If permitted queue manager segments a large message when it does not fit in a queue. Application has the option to receive entire message in piece or each segment separately. Application can also control the logical boundaries or buffer size of the segment of a message. Queue Manager ensures that the order of the segment is maintained. • Several small messages can be grouped to build one larger physical message. • Using a Distribution List, you can send a message to more than one destination. Distribution List is a file contains a list of queue names and queue managers that own them. Receiving Queue Manager replicates the messages and puts them into destination queues (This function is called late fan-out). • MQ Series knows 4 types of massages: Datagram (unsolicited message), Request (a message for which response is expected), Reply and Report (an event such as occurrence of an error or confirmation on arrival or delivery) • MQ Series messages can be persistent and non-persistent. • Message Descriptor contains: Version, Message ID/Correlation ID, Persistent/ Non- Persistent, Priority, Date &m Time, Lifetime of a message, Return Address, Format, Sender Application and Type, Report options/ Feedback (COA, COD), Back out counter, Segmenting/ Grouping Information. Queue Manager (MQM) • Manages queues and messages for applications • Transfers messages to other Queue Managers via channels using existing network facilities. • It refers to objects that are defined by the administrator. • Coordinates updates to databases and queues using two-phase commit. • Gets and puts from/to queues are committed together with SQL updates, or backed out if necessary. • Segments messages, if necessary, and assembles them. • Can group messages and send them as one physical message to their destination, where they are automatically disassembled. • Can send one message to more than one destination using a user-defined dynamic destination list. • Allow administrators to create and delete queues, alter properties of existing queues, control the operation of queue manager. • MQ Series for Windows NT version 5.1 provides GUI to administer. • MQ Series for Windows (different from NT) is a single-user queue manager and is not intended to function as a queue manager for other MQ Series clients. Page 1 of 4
  • 2. Queue Manager Clusters • MQSeries for MVS/ESA and Version 5.1 for distributed platforms, provides clustering features • Queue Managers that form a cluster can run in the same machine or in different machines on different platforms. • Two of Queue Managers maintain a repository that contains information about all queue managers and queues in the cluster (full repository). Other Queue Managers maintain only a repository of the objects they are interested in (partial repository). • Queue Managers use special cluster channels to exchange information. • Client application may specify a queue manager and direct the message to a specific queue in a cluster or it may let a queue manager to determine where the queue is and to which one to send the message. • Client uses a Transmission Queue on its machine and destination queue is called “Target Queue”. • Administrator must define the name of the cluster, when a queue is defined. • MQSeries distributes the messages round robin. Queue Manager Objects • A Queue Manager uses 3 types of objects, namely, Queues, Process Definitions and Channels. • Queues are used to store messages. • Process Definition object defines an application to a queue manager. It contains a name of a program (and its path) to be triggered when a message arrives for it. • Channel is a communication link. There are 2 kinds of channels, namely, Message Channels and MQI channels. • Message Channel connects 2 queue managers via Message Channel Agents (MCA). Message Channel is unidirectional. • MCA is a program (also called mover) that transfers messages from a transmission queue to a communication link and from communication link to a target queue. • MQI channel connects MQSeries client to a queue manager and is bi-directional. • Message Channel can run at 2 speeds: fast and normal. Fast Channels improve performance but messages can be lost in case of channel failure. Message Queues • Message Queues belong to Queue Manager. • Types of Messages Queues are: o Local Queue – is a real queue! o Cluster Queue – is a local queue that is known throughout a cluster of queue managers. o Remote Queue – structure describing a queue hosted by a different queue manager. o Transmission Queue – a local queue used for messages to be sent to a remote queue. o Initiation Queue – local queue with a special purpose o Dynamic Queue – local queue created on the fly o Alias Queue - - if you do not like the queue name o Dead-Letter Queue – one for each queue manager o Reply-to Queue – specified in request message o Model Queue – model for local queues o Repository Queue – hold cluster information • Create a queue manager using the command: crtmqm. Example: o Crtmqm /q /u system.dead.letter.queue MYQMGR • To start a queue manager issue command: strmqm Page 2 of 4
  • 3. Manipulating Queue manager Objects • Use the utility RUNMQSC to manipulate queue manager objects. Ensure queue manager is started prior using the runmqsc utility. Example: C:strmqm runmqsc define qlocal(‘QUEUE1’) replace descry (‘test queue’) alter qmgr deadq(system.dead.letter.queue) end How MQSeries Works Following diagram depicts how MQSeries works: Figure: How MQSeries Works Program 1 Program 2 Starts MQM A MQM B MQPUT Channel Initiator Listener Trigger Monitor (Must be running) (Must be running) (Must be running) Monitors (Default port 1414) Remote Q Starts MQGET Starts Monitors MQSeries Channel MQSeries Channel Agent Agent Ch Init Q (MCA) (MCA) System Init Q Moves Moves Xmit Q Network Local Q MQM A - Detect message destined for MCA - Moves messages to a local Q and to remote Q moves it to xmit Q and a Ch init Q System Init Q Communication between Queue managers How to Trigger Applications Message Queuing Interface MQCONN Connect to a Queue Manager MQDISC Disconnect from a Queue Manager MQOPEN Open a specific queue MQCLOSE Close a queue MQPUT Put message on a queue MQPUT1 Get message from a queue MQGET MQOPEN + MQPUT + MQCLOSE MQINQ Inquire properties of an object Page 3 of 4
  • 4. MQSET Set properties of an object MQCONNX Standard or fast path bindings MQBEGIN Begin a unit of work (database coordination) MQCMIT Commit a unit of work MQBACK Back out Page 4 of 4