Friday 3 March 2017

IBM MQ Introduction

                                            IBM MESSAGE QUEUE


IBM MQ is messaging middleware that simplifies and accelerates the integration of diverse applications and business data across multiple platforms. It uses message queues to facilitate the exchanges of information and offers a single messaging solution for cloud, mobile, Internet of Things (IoT) and on-premises environments.

By connecting virtually everything from a simple pair of applications to the most complex business environments, IBM MQ helps you improve business responsiveness, control costs, reduce risk—and gain real-time insight from mobile, IoT and sensor data.

IBM MQ is available as standalone distributed software, as a physical appliance and on IBM z/OS®. IBM MQ workloads can also be pushed to the cloud. An enhanced version of MQ—IBM MQ Advanced—is available as distributed software and on z/OS to meet a greater set of integration requirements, including extended encryption, file transfer capabilities and a telemetry option for access to data from sensors and mobile devices.



Pre-requisites for MQ before install



1. Hardware requirements----disk space
2. Software requirements----o/s specifications
Disk Storage: Typical storage requirements are as follows:
Server installation
Client installation
Data storage (server)
Data storage (client)
LINUS
50 MB
15 MB
50 MB
5 MB
WINDOWS
50 MB
15 MB
50 MB
5 MB
Connectivity: The network protocols supported by WebSphere MQ are:
1. TCP/IP
2. SNA LU 6.2
3. LU 6.2
4. NetBIOS
Databases: DB2 7.1, 7.2 Oracle 8i and 9i
Java: If you want to use the Java Messaging Support, you need the Java Runtime Environment Version 1.3 or
later

                           STEPS TO INSTALL

1) on linux, check the disk space by using the following command,
$ df -k df -h
df --> shows the disk memory used, remaining, usage%, etc,.
df -h --> shows the size of utilization in the human readable format, say KB, MB, GB, etc,.

2) Create mqm user id and make mqm as its primary group.
The installation directory for mqm is opt/mqm & the working data is stored in var/mqm.

3) ./mqlicense.sh -accept --> to accept the license

4) Then run the commands to install all the packages required.
$rpm -ivh <packagename>

$rpm -ivh <packagename> <packagename> [with spaces] --> multiple package installation @ the same time.

rpm –ivh --> (redhat package manager) (i- install v- verbose h- hash format)
$rpm -qa | grep mq --> to check the packages installed

$ps -ef | grep mq --> To check all the running processes

$Kill -9 Process id --> to end/kill the processes.



   Configure Websphere MQ authorization for Queue Manager Objects




 The setmqaut command and authorization requirements:
The setmqaut command is used to grant and revoke authorizations to user IDs and MQ objects.
We use the WebSphere® MQ connector in a job to perform these tasks:             To establish a connection to a queue manager,
     To read messages from source queues so that they can later be processed by other stages in the job, and
·           To take data that is produced by the stages in the job and write it as messages to the target queues.
To enable the connector to access the specified queue manager and queue objects, we must grant certain
authorizations to the user ID under whose credentials the connector runs. If the user ID does not have the necessary
authorizations to the objects, the connector reports MQ error code 2035 (MQRC_NOT_AUTHORIZED).
After we grant authorizations, the authorization service that is associated with the queue manager inspects the list of
authorizations that we grant to the user ID to determine whether the user ID is authorized to perform a particular
operation on a particular MQ object.
Two factors determine the IDs to which we grant authorizations:
Whether the connector runs in Server mode or in Client mode and whether the connector is running in a job or is
invoked at design time, for example to test the connector. The mode in which the connector runs also determines the
objects for which we set authorizations. In general, we must grant authorizations for the queue manager, queue, and
namelist objects that the connector accesses.
Depending on the mode in which the connector runs, we use the setmqaut command to grant one or more of the
Following authorizations to each MQ object:
altusr – To specify an alternate user ID to use for opening queues
browse – To browse messages on queues
connect – To connect to queue managers
dlt – To automatically delete the dynamic reply queue when closing it
dsp – To create dynamic queues that are based on a model queue
get – To get messages from queues
inq – To inquire about the attributes of MQ objects
put – To put messages on queues
setall – To set identity context fields and origin context fields on messages
setid – To set the identity context fields on messages
After we use the setmqaut command to grant authorizations to MQ objects, issue the REFRESH SECURITY command
to refresh the security cache for the queue manager. For example, the refresh the security settings for the queue
manager QMNAME, we issue the following command:
runmqsc QMNAME
When the MQSC editor opens, issue the following MQ command:
REFRESH SECURITY
The following response message should display to confirm that the security cache was refreshed:
AMQ8560: WebSphere MQ security cache refreshed
Few examples are listed below on how to grant permissions while configuring authorization:
1. This example shows a command that specifies that the object on which authorizations are being given is
the queue orange.queue on queue manager saturn.queue.manager. If the queue does not exist, the
command fails.
http://webspheremqadministrator.blogspot.in/2014/06/how­to­configure­websphere­mq.html
1/516/09/2016
How to Configure Websphere MQ authorization for Queue Manager Objects ?
setmqaut ­m saturn.queue.manager ­n orange.queue ­t queue  ­g tango +inq +alladm
The authorizations are given to a user group called tango, and the associated authorization list specifies that the user
group can:
·           Issue MQINQ calls
·           Perform all administration operations on that object
2. In this example, the authorization list specifies that a user group called foxy:
·           Cannot issue any MQI calls to the specified queue
·           Can perform all administration operations on the specified queue
If the queue does not exist, the command fails.
setmqaut ­m saturn.queue.manager ­n orange.queue ­t queue  ­g foxy ­allmqi +alladm
3. This example gives user1 full access to all queues with names beginning a.b. on queue manager qmgr1.
The profile is persistent and applies to any object with a name that matches the profile.
setmqaut ­m qmgr1 ­n a.b.* ­t q ­p user1 +all
4. This example deletes the specified profile.
setmqaut ­m qmgr1 ­n a.b.* ­t q ­p user1 ­remove
setmqaut ‐m qmgr1 ‐n




No comments:

Post a Comment