Trying to use jms publisher/subscriber in jmeter to connect to IBM MQ - jmeter

We have been using jms point-to-point sampler in jmeter to post an xml based request to the MQ. Since then our application has changed and now the messages that are posted to the MQ are Serialable objects created with spring integration. To have a test around this, we tried using jms publisher/subscriber. All the online support we tried is pointing to connection to ActiveMQ. Has anyone tried using jms published to post object message to and IBM MQ?

The online approach gives you all the elements to switch to IBM MQ.
You would need to:
put IBM MQ jars in lib folder of jmeter
Find the infos needed for :
http://jmeter.apache.org/usermanual/component_reference.html#JMS_Subscriber
http://jmeter.apache.org/usermanual/component_reference.html#JMS_Publisher
This will help you:
http://leakfromjavaheap.blogspot.com/2014/07/jmeter-and-websphere-mq-series.html?_sm_au_=iVV5P5vR626sDt7V

Related

How to send MQ messages (JMS) using JMeter

I have to put messages in a queue for which I have all the connection details (host, port, channel, manager, queuename and username). I never worked on implementing JMeter for sending MQ. Can anyone let me know where can I get (blog or reference) step by step procedure to perform this? I tried referring to official site, can't really understand those JNDI, connection Factory settings
Man, your MQ statement is too general as there are too many possible message queue system providers like Apache ActiveMQ, RabbitMQ, IBM MQ, TIBCO, etc. and the values for all these JNDI/JMS properties, connection factory names, queue names, etc. will be different.
To get an overview of Java communication with "MQ" get familiarized with Getting Started with Java Message Service (JMS)
Download .jar files for your MQ system and put them to JMeter Classpath
Perform configuration as per your MQ system connection settings, example setup for Apache ActiveMQ is here: Building a JMS Testing Plan - Apache JMeter

How to write test cases for IBM MQ using Embedded MQ?

I am new to IBM MQ and don't have any background. I have followed the below link for code development.
https://developer.ibm.com/components/ibm-mq/tutorials/mq-jms-application-development-with-spring-boot/
I am trying to figure out how to write/test IBM MQ using an embedded MQ server (For eg: Embedded Kafka), but unable to identify the solution. Can anyone help me with the following queries,
Do we have any Embedded MQ server support which can be used to test IBM MQ with Spring Boot application?
If yes, Can you please share some examples of how to test it.
Try the documentation at this git hub repo - https://github.com/ibm-messaging/mq-jms-spring
Extract from the readme:
IBM MQ JMS Spring Components
This repository contains code to help to provide Spring developers
with easy configuration of the IBM MQ JMS package.
The library contains:
mq-jms-spring-boot-starter for Spring Boot 2 applications

Build a standalone JMS client using JAVA

I am new to JMS and I need to build a generic JMS client to create a connection send and receive message by using queues and topics. I have seen many example using activeMQ connection factory, but I need a generic client which can use any connection factory and create a connection. Any leads or sample codes will be useful.
I have just done that recently. Steps I've taken
Read Java JMS tutorials to understand what is JMS.
You can code in Java or use a framework for example - Spring JMS
Read about MQ provider docs. for example activeMQ or IBM MQ.

Not able to create jms queues in websphere programatically using standalone java client

I wrote a java client to connect to jms in websphere.
I was able to connect and produce and consume message.
Problem I am facing is when I do Session.createQueue(), websphere jms is not creating a new queue.
Please could some one throw some light on this issue...
Thanks in advance...
If you are working with WebSphere MQ as the messaging provider within WebSphere Application Server the queue will need to be created on the WebSphere MQ QueueManager first. This can be done either via the graphical WMQ Explorer or via the command line using the 'runmqsc' tool.
Information can be found for these via the WMQ InfoCentre - suggest doing a websearch for "WMQ Library" to get the latest link, currently though it is http://www-01.ibm.com/software/integration/wmq/library/index.html
Topics though don't need to be pre-created - though they can be if required. Various properties can be set different to the default.
If the Queue doesn't need to be permanent, for example as a temporary reply to then look into creating a temporary queue from the JMS Connection.
createQueue doesn't create a new queue. It simply creates a javax.jms.Queue object from a vendor specific identifier. javax.jms.Queue objects are just references to existing queues. Typically, you retrieve javax.jms.Queue objects from JNDI; createQueue is only useful in scenarios where using JNDI is not possible or not desirable.
Note: there is one exception to this, namely JMS providers that support autocreation of queues (I think ActiveMQ has such a feature).

to view all websphere MQ messages in JMS call

I use JMS (Java Message Service API) in my java application to work with queues/topics residing on websphere MQ. I am looking for a tool/support pac which can show me all MQ Messages being called e.g. when I do queueConnectionFactory.createConnection(), it would have resulted into MQCONN/MQCONNX call, so I need to see what excatly is being passed. So basically during my entire JMS based interaction, I want to see all MQ messages which are being passed to. Is it possible?
if you are using websphere, you can turn on tracing by going to WAS console and tracing service to enable jms logging.
Trace tells you what APIs are being called. To a good extent trace helps. But beyond that call IBM help.
If you are using JMS MQ client mode connection it is possible to run send/receive exits on the MQ SVRCONN channel to log the client MQI and message flows. The free IBM SupportPac MA0Z has this capability. This technique is not possible with a binding mode connection because there is no MQ channel involved.

Resources