What is Messaging Queue?Messaging Queue (MQ), a message oriented middleware tool, is an product since 1992. It is very helpful to communicate messages (XML/text file/HTML file etc.) in (service Oriented Architecture) on over 80 platforms.It is reliable and provides a secured, assured communication medium and an excellent messaging solution to Enterprise Architecture across the globe.Today’s article is about testing Messaging Queue that facilitates transportation of messages between two applications/modules. This will help you test the connectivity between applications/modules during message transportation.
What You Will Learn:.Real time example of Messaging Queue systemLet’s take ICICI Bank that includes many systems running in parallel to make one complete application. Assume that the ICICI Bank shows an annual profit margin of $100 Million for the year 2015.This profit would be an aggregate of all systems such as Saving Account, Credit Card Account, Home Loan Account and so on.ICICI bank as a parent system seeks communication from each of its individual systems. This communication can primarily be carried out by Messaging Queue system.Parent ICICI bank can send a request that it needs the gross profit of the Savings account application. The saving account application then calculates this information, stores it in the form of XML and places it in the remote queue.The parent system then will call the remote queue to retrieve this information. Application with MQThe key configuration in MQ is setting up the Queue Manager.A few important details about the Queue Manager are mentioned below. It owns/manages the complete functioning of the WebSphere MQ Application. It’s not responsible for transmitting data.
Contains a channel and port to transmit data to a particular destination queue or to store the message internally till other queue picks the message. Applications could have multiple Queue Managers/channels to communicate messages.Technical exampleLet’s assume there are applications APPS, APPP, APPF, APPL, APPD.
All are communicating messages among each other. Once the APPS application processes the data, it generates the XML message and puts it into the queue. APPS job is done.It’s time to pick the message by the other queue until then the Queue Manager will hold the data.Now let’s say the APPP application should pick the XML message from the MQS queue. The APPP MQ config file is configured to fetch the XML message from the MQS queue.The MQP queue will fetch the XML message from the MQS queue and sends it to APPP application for further processing.Similar processes are carried out by each application to obtain data from other applications. Scenario 2 – APPP sends data to APPSThis time the config files will be different at both sides.
The MQ config file at APPP will have different queue info like Queue Manager-APPPQMR, channel-APPPCHR, queue name-MqpR, portnum-1111.And the APPS will have different queue info like Queue manager-APPSQMR, channel-APPSCHR, queue name-MqsR, portnum-1111. Remember that the port number can be same for few applications as they could be connected as peers in the same system.Therefore, all the applications will have to be configured accordingly to communicate messages among themselves.There is a possibility that a communication can happen between local applications that are in a current system with a remote application elsewhere. As mentioned above, both local and remote applications should have configuration files to set up in their server to enable communication.As mentioned above, both local and remote applications should have configuration files to set up in their server to enable communication. Functional Testing with MQTesters will have to validate the following. Application configuration.
Queue configuration. Message format. Message correctness and completeness. Message transmission.
Ibm Mq Sample Programs
Message failures, when they occurMQ in SOAMQ is a reliable technique that can be used in architecture to communicate messages among applications. As message communication is a key concept for running an ERP system, MQ provides the right solution for it.It is effortless and secure. Basic and really helpful to understand what is MQ and how it works.In Real test scenario – I have one Test system which connects to outside system using MQ in production. How can i simulate that outside system in my test environment? Is there any way out for this case?Let me give example: ICICI Bank sends message to Processing system with XML fields of ACCNO, NAME, AMT, DATE etc.
I am tester of ICICI Bank Application. I want to verify the request and response. How can I do that? I am a sender and receiver but other system is outside my test environment. How to simulate it?.
Java -cp./com.ibm.mq.allclient-9.0.4.0.jar./javax.jms-api-2.0.1.jar. Com.ibm.mq.samples.jms.JmsPutGetYou should see output like this:Sent message:JMSMessage class: jmstextJMSType: nullJMSDeliveryMode: 2JMSDeliveryDelay: 0JMSDeliveryTime: 110JMSExpiration: 0JMSPriority: 4JMSMessageID: ID:4d873192JMSTimestamp: 110JMSCorrelationID: nullJMSDestination: queue:///DEV.QUEUE.1JMSReplyTo: nullJMSRedelivered: falseJMSXAppID: JmsPutGet (JMS)JMSXDeliveryCount: 0JMSXUserID: appJMSIBMPutApplType: 28JMSIBMPutDate: 20180223JMSIBMPutTime: 15305112Your lucky number today is 95Received message:Your lucky number today is 95SUCCESS.
Amqsgetc Command
Mq Client Sample Program Application
This tutorial is based on JMS 2.0 or simplified JMS API. Earlier versions can still be used to support backward compatibility. Check out the JMS 2.0 specification.JMS takes messaging objects that are common to different messaging providers and defines them in a way that can be reused regardless of the JMS messaging provider.It also provides facilities for encapsulating concepts that are specific to each provider,in a way that can minimise how much a developer needs to know about how each messaging provider works.IBM MQ implements JMS and provides a set of classes that your application can use. You need to have access to these classes as well as the JMS API. Overview of the simplified JMS API objects.On your client application side, the JMS API provides ways to access messaging provider (MQ) objects.In production environments, your JMS administered objects would access information about the objects on theprovider (MQ server) side, from a JNDI store that is separate from the client and the messaging server. Your application would not use each MQ parameter directly as this means it would be tightly coupled to the queue manager, channel and thequeue.Each time something changed with any of those, you would have to make changes to your application too.The MQ administrator usually manages a store where connection factory and destination name-object pairs are bound, see.