Tuesday, October 22, 2013

Setup MQ Queues & QueueManager - For Novice

People who have not worked much on Websphere MQ v7.1 find it tricky to setup queues and security (channels, authorization etc). I too being novice on Websphere MQ took me good time to configure and connect it from Java. Based on my experience mentioning here the steps that I followed to setup the things right on MQ and  I found it easy as well.


  1. Install Websphere MQ v7.1 on linux. This will create a new linux user and group named 'mqm'.
  2. Since MQ does not allow the users belonging to admin (mqm) group to connect to queues so lets also create linux user say 'mquser' and assign it to mqm group.
  3. MQ requires you to first create a queue manager before queue. MQExplorer is eclipse based client program to administer MQ and a good UI based option for novice. So first create a queue manager say - "DefaultQM" with default parameters like port etc.
  4. Next create one local queue say "FirstQ" that will be your first queue using explorer. 
  5. A server connection channel is required to establish connection to server and access queues. This also can be created by explorer under IBM Websphere MQ > Queue Managers > [DefaultQM] > Channels.
  6. Create a new channel authentication records as shown in the document MQChlAuthCreation.doc.
  7. You will see a default channel authentication record that blocks all the MQADMIN users. Override this by executing the following command
    SET CHLAUTH('<server connection channel>') TYPE(BLOCKUSER) USERLIST('nobody')
  8. more details can be found here. This command actually set unlock all users to establish connection to MQ. Though its not a recommended setting but it works for learning and r&d purpose.
  9. Next write a java program to send and receive messages to/from MQ. This is easily available on many developer portal like this one - java program.

If everything is set correctly you will see a java program able to produce and consume a message to MQ. Please contact me in case you need document/java program.

Demystifying OIC, OCI and Oracle SOA CS

What is OIC (Oracle integration cloud), OCI (Oracle cloud infrastructure), and SOA cloud service and how they are different? - This has bee...