0% found this document useful (0 votes)
106 views10 pages

SI - IBm MQ

IBM MQ is middleware that allows applications to communicate asynchronously by sending messages to queues or topics. It provides reliable message delivery, security, and scalability. IBM MQ supports point-to-point and publish/subscribe communication between applications running on different platforms. Administrators can use commands like runmqsc, dspmq, crtmqm to control queue managers, display queue status, create/delete queues, and start/stop messaging services.

Uploaded by

Marco Cruz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
106 views10 pages

SI - IBm MQ

IBM MQ is middleware that allows applications to communicate asynchronously by sending messages to queues or topics. It provides reliable message delivery, security, and scalability. IBM MQ supports point-to-point and publish/subscribe communication between applications running on different platforms. Administrators can use commands like runmqsc, dspmq, crtmqm to control queue managers, display queue status, create/delete queues, and start/stop messaging services.

Uploaded by

Marco Cruz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Introduction of IBM MQ

29 June 2020 08:21

What is Message Queue ?

Message, any message which is sent from source to destination. Programs communicate by sending each other data in
messages rather than by calling each other directly. For an example, message vs calling a person to your place.

Queue, a process of waiting in an order to clear the previous request and to proceed. Messages are placed on queues, so
that programs can run independently of each other, at different speeds and times, in different locations, and without
having a direct connection between them.

Queue

No Queue

What is IBM MQ ?

IBM MQ can transport any type of data as messages, enabling businesses to build flexible, reusable architectures such as
service-oriented architecture (SOA) environments. It works with a broad range of computing platforms, applications, web
services and communications protocols for security-rich message delivery. IBM MQ provides a communications layer for
visibility and control of the flow of messages and data inside and outside your organization.

IBM MQ is messaging and queuing middleware, with several modes of operation: point-to-point (will be used for unicast);
publish/subscribe (applications can publish messages to many subscribers over multicast)
; file transfer.

Which domains are these MQ services are used ?

Banking, Retails, Insurance, Health Care, and others.

Advantages of MQ ?

• Versatile messaging integration from mainframe to mobile that provides a single, robust messaging backbone for
dynamic heterogeneous environments.
• Message delivery with security-rich features that produce auditable results.

IBm MQ Page 1
• Message delivery with security-rich features that produce auditable results.
• Qualities of service that provide once and once only delivery of messages to ensure messages will withstand application
and system outages.
• High-performance message transport to deliver data with improved speed and reliability.
• Highly available and scalable architectures to support an application’s needs.
• Administrative features that simplify messaging management and reduce time spent using complex tools.
• Open standards development tools that support extensibility and business growth.
• Sync & Async method of communication
• Independent of OS
• Loosely coupled architecture

Competitor of MQ ?

Apache Kafka
Rabbit MQ
JMS
Oracle Fusion

Types of message content ?

• Binary
• Text, Raw text, Xml.
• Structured data, C, Cobol or serialized java object.
• Swift Messages.
• And others.

Latest Version of MQ ?

9.1

Types of Messages ?

DATAGRAM - A message sent no response is expected.


REQUEST - A message is sent responses is expected.
REPLY - A response message for a requested message.
REPORT - A message that describes the occurrences or event.

Multiple mode of operations ?

Point-to-point ( Queues )
Applications send messages to a queue and receive messages from a queue. Each message is consumed by a single
instance of an application. The sender must know the name of the destination, but not where it is.

Publish/subscribe ( Topics )
Applications subscribe to topics. When an application publishes a message on a topic, IBM MQ sends copies of the
message to those subscribing applications. The publisher does not know the names of subscribers, or where they are.

Queues:

IBm MQ Page 2
Sender JMS / MQ Server Receiver

Sender will send out messages and it would be stored in the JMS/MQ server and it gets
delivered at the receiver's end.

As it’s a queue system, the messages would stand in line and get out for delivery.

As it’s a queue system, One sender can send one message at a time to one receiver.

The Sender knows the receiver.

There is no time limit for the messages to get delivered.

Topic System:

Publisher JMS / MQ Server Subscriber

This is a topic system, where publisher would publish his content to the JMS server and
anyone can subscribe to it.

The message would go randomly to the JMS server and any number of people can subscribe
to it.

Available for a specific time limit.

This is not an intended message, so the publisher will not have any idea about the
subscriber.

The main features of applications that use message queuing techniques are:

• There are no direct connections between programs.


• Communication between programs can be independent of time.
• Work can be carried out by small, self-contained programs.
• Communication can be driven by events.
• Applications can assign a priority to a message.
• Security.
• Data integrity.
• Recovery support.

IBm MQ Page 3
Objects & Services:

• QUEUE - it is a database structure which stores messages until the application or program receives it.
• CHANNELS - Channels are objects that provide a communication path from one queue manager to another. Channels are
used to move messages from one queue manager to another and they shield applications from the underlying
communications protocols.
• PROCESS Definition - The process definition object defines an application that starts in response to a trigger event on an
IBM® MQ queue manager. The process definition attributes include the application ID, the application type, and data
specific to the application.
• QUEUE MANAGER - Objects and services are defined in here.

Types of Queues:

• Local Queue - Transmission, initiation, dead-letter, command, default, channel, and event queues are types of local
queue.
• Alias Queue - An alias queue is an IBM® MQ object that you can use to access another queue or a topic. This means that
more than one program can work with the same queue, accessing it using different names.
• Dynamic & Model Queue - A model queue is a template of a queue definition that you use when creating a dynamic
queue.
• Remote Queue - To a program, a queue is remote if it is owned by a different queue manager to the one to which the
program is connected.
• Repository Queue - Used on cluster, A repository is a collection of information about the queue managers that are
members of a cluster. Typically, two queue managers in a cluster hold a full repository. The remaining queue managers
all hold a partial repository.

How does it work?

IBm MQ Page 4
Here is a brief overview of how IBM MQ works.
• First a messaging application must connect to a queue manager. This may require a channel to be created on the queue
manager to accept application connections.
○ When your application wants to transfer data to another application, it creates a message and puts the data into it. It
puts the message onto a queue, or publishes the message to a topic to be delivered to subscribers to the topic.
• The queue or subscriptions may be on the same queue manager or on other, connected, queue managers. If the latter
the connected queue managers work together to reliably transfer the message from the producer’s queue manager to
the target queue managers. The applications do not communicate with each other, the queue managers do.
• Messages can be handled based on a number of different qualities of service, where reliability and persistence is traded
for speed. The highest quality of service given to messages are persistent messages that are sent and received under the
control of transactions. This will ensure that messages are delivered once and once only even in the event of system,
network or application failures.
• IBM MQ channels are used to connect one queue manager to another over a network. You can create MQ channels
yourself, or a queue manager can join a cluster of queue managers where MQ channels are automatically created when
they are needed.
• [z/OS]On z/OS®, you can configure multiple queue managers to share queues on the coupling facility. Applications
connected to different queue managers can get and put messages to and from the same queues.
• You can have many queues and topics on one queue manager.
• You can have more than one queue manager on one computer.
• An application can run on the same computer as the queue manager, or on a different one. If it runs on the same
computer, it is an IBM MQ server application. If it runs on a different computer, it is an IBM MQ client application.
Whether it is IBM MQ client or server makes almost no difference to the application. You can build a client/server
application with IBM MQ clients or servers.

IBm MQ Page 5
Installation of IBM MQ
29 June 2020 08:24

Please refer the videos on your video platform.

IBm MQ Page 6
IBm MQ Page 7
Basic Commands
30 June 2020 08:11

Series of commands:
Run - To run certain objects & Services
Dsp - TO Display certain objects & Services
Dlt - To Delete certain objects & Services
Crt - To Create certain objects & Services
Str - To start certain objects & Services
End - To stop certain objects & Services
Add - To add Certain objects & Services
Set - To Set variables for certain objects & Services
MQExplorer - for GUI control & configuration.
runmqsc - for CLI control & configuration.

Control Commands:

Cd /opt/mqm/bin/
./dspmq - to display queue manager names
./dspmqver - to display MQ version
./crtmqm qm1 - to create a mq queue manager
./delmqm qm1 - to delete a mq queue manager
./strmqm qm1 - to start a mq queue manager
./endmqm qm1 - to stop a mq queue manager
./runmqsc qm1 - to enter mq command line interface

MQSC:

First SECOND ( Value ) [ options ]

MQ SC Commands:

These are commands typed inside the mqsc for that queue manager.

Cd /opt/mqm/bin/
./runmqsc qm1

define qlocal('q1') - to create a queue

display qmgr -> to display all the settings

DEFINE LISTENER(SYSTEM.DEFAULT.LISTENER.TCP) TRPTYPE (TCP) Port(1414) ipaddr() - this is to add a listener and to add the ip
address and port number to the listener on the current queue manager.

disp LISTENER(QMGR) - This is to display only the listener in the current queue manager.

IBm MQ Page 8
Start listener(QMGR) - this will start the listener.

##Now do a telnet from the remote server to see if they are connecting perfectly.

##Now we need to create a channel for communication.

Define channel(SYSTEM.ADMIN.SVRCONN) CHLTYPE(SVRCONN) TRPTYPE(TCP) DESCR('WMQ Default Channel') REPLACE

end - to exit

For authentication problems:

Cd /opt/mqm/bin/
./runmqsc qm1

display qmgr

alter QMGR CHLAUTH(DISABLED) - This will disable the authentication

display qmgr

end

./setmqaut -m qm1 -t qmgr -g mqm +all - Full permission for MQM group.
sudo usermod -a -G mqm root - We are adding mqm to the root group.

Reboot the system.

IBm MQ Page 9
Queues Introduction
Tuesday, June 28, 2022 1:23 PM

Queue Description
type
Local A local queue is a definition of both a queue and the set of messages that are associated with the queue.
queue The queue manager that hosts the queue receives messages in its local queues.
Transmissi Transmission queues are a special type of local queue. When the queue manager sends a message to a
on queue queue on a remote queue manager, the transmission queue stores the message locally until the queue on
the remote queue manager is available. To create a transmission queue, create a local queue and
change its Usage attribute to Transmission.
Remote Remote queue definitions are definitions on the local queue manager of queues that belong to another
queue queue manager. To send a message to a queue on a remote queue manager, the sender queue manager
definition must have a remote definition of the target queue.
Alias Alias queues are not actually queues; they are additional definitions of existing queues. You create alias
queue queue definitions that refer to actual local queues but you can name the alias queue definition differently
from the local queue (the base queue). This means that you can change the queues that an application
uses without needing to change the application; you just create an alias queue definition that points to the
new local queue.
Model A model queue is a template for queues that you want the queue manager to create dynamically as
queue required. When an application tries to put a message on a model queue, the queue manager dynamically
creates a local queue with the same name as the model queue. Queues that are created in this way can
either be temporary or permanent.
Cluster A cluster queue is a queue that has been shared in a cluster so that all of the queue managers in the
queue cluster can put and get from the queue using cluster channels.

IBm MQ Page 10

You might also like