JMeter JMS Point to Point not returning correct response - jms

JMeter Version: 2.10 .
ActiveMQ 5.9
I have a point to point JMeter script that successfully places a message on a queue. This messaged is then consumed, transformed and placed on a different queue. When I test just a request method (from jmeter), the message is successfully submitted, transformed and returned to the out queue, however when I configure JMeter to consume the response on the out queue, it shows the original request message payload as the response.
Here is my JMeter script details:
JMS Resources
QueueuConnectionFactory: ConnectionFactory
JNDI Name Request Queue: Q.REQ
JNDI Name Reply Queue: Q.RPL
Message Properties
Communication Style: Request Response
Use alternate fields for message correlation: Use Request Message ID (ticked)
Content: (XML Payload)
JNDI Properties
InitialContextFactory: org.apache.activemq.jndi.ActiveMQInitialContextFactory
queue.Q.REQ: message.in
queue.Q.RPL: message.out
java.naming.security.principal: admin
java.naming.security.credentials: admin
Properties
Provider URL: tcp://localhost:61616
I've also tried a few different combinations such as removing the reply queue and specifying a JMSReplyTo as well as manually specifying a JMSCorrelationID. If someone could point me in the right direction or even provide a working jmeter proj example, it would be much appreciated. I also used this guide: http://jmeter.apache.org/usermanual/build-jms-point-to-point-test-plan.html to help build my test.

It looks like that you're missing Q.REQ and Q.RPL definition in JNDI Properties section. They should go along with InitialContextFactory bit.
See Building a JMS Testing Plan - Apache JMeter guide for more details.

Having spoke to a few people, this is a known issue and I haven't found a suitable workaround for this issue right now.
Currently I have had to use the JMeter JMS Pub/Sub Samplers to get this to work properly. If I hear back from the user group I will update this answer accordingly.

Related

Elastic APM - Creating Transaction / Span using traceparent / trace_id in C# Agent Libraries

I'm trying out the .Net agent in Elastic APM and I'm using a C# application which is created using a framework called ASP.net Boilerplate. I've added the core libraries as mentioned in the documentation and added the settings in appsettings.json. This enables the default instrumentation and I got traces in the APM visualized through Kibana.
Currently I've got a node.js application running and I publish a message to a RabbitMQ queue with the traceparent in the message payload. The C# app reads the published message. I need to create a transaction or span using this traceparent / trace id so that Kibana would show the trace among the distributed systems.
I want to know if there is a way to create a transaction (or span) using a traceparent that is being sent from another system not using a HTTP protocol. I've checked the Elastic APM agent documentation -> Public API for information but couldnt find any information on this. Is there a way? Thanks.
I want to know if there is a way to create a transaction (or span) using a traceparent that is being sent from another system not using a HTTP protocol.
Yes, this is possible and there is an API for it. This part of the documentation explains it.
So you'll need to do this when you start your transaction - I imagine in your scenario this will be when you read a message from RabbitMQ.
When you start the transaction there is an optional parameter called distributedTracingData - if you pass it, then the transaction will reuse the traceid which you passed through RabbitMQ, and this way the new transaction will be part of the whole trace. If you don't pass this parameter, a new traceid will be generated and a new trace will be started.
Another comment that may help: you pass the trace id into the method where you start the transaction and each span will inherit this trace id within a transaction - so you control this on the transaction level and accordingly you don't pass it into a span.
Here is a small code snippet on how this would look:
serializedDistributedTracingData = //read this from the message which you get RabbitMq
var transaction2 = Agent.Tracer.StartTransaction("RadFromQueue", "RabbitMQRead",
DistributedTracingData.TryDeserializeFromString(serializedDistributedTracingData));
#gregkalapos, again thank you for the information. I checked how to acquire the neccessary trace information as in node.js agent documentation and when I debugged noticed that it was the trace id. Next in the C# consumer end I placed a code snippet as mentioned in the .Net agent and gave it a run. Kibana displayed the transactions from two different services in a single trace as I hoped it would.

Performing load test on Tibco JMS endpoint with JMeter

I want to perform load test on a Tibco JMS endpoint using JMeter. The endpoint is a JMS Queue Receiver that will reply to the JMS Message to end the sessions. I have done a lot of googling regarding what parameters to fill in each field of the JMS Point-to-Point sampler with no success. Attached is a screen shot of the Jmeter window. I am not sure whether this is the right sampler to use or if I should use Publisher. Either way, I do not know what to fill in each of these fields. I am currently stuck at the JNDI name Request queue field. When I put my queue name for the JMS on Tibco, I get an error that that name is not found. Leaving the field blank is also problematic. What should I fill in this field to make the request work?
We don't know your topic/queue names so we cannot help, you can ask around, see the application you're trying to simulate configuration or use Graphical Administration Tool for TIBCO® EMS to explore the endpoint and identify the proper queues for messages sending/receiving. For sending the messages you might need to set JMS_TIBCO_SENDER JNDI property
You might also be interested in Building a JMS Testing Plan - Apache JMeter article

Is there any way to find the status of RabbitMq consumer/listener

I've written a RabbitMq listener application using spring-boot and want to know the status whether it is processing the messages or idle.
I've been through the rabbitMq HTTP API doc and found /api/queues/vhost/name/get endpoint gives the message count and message body. I see an opportunity in that, decided to compare the message count and message body for two successive responses. If both responses are same then the listener is idle else it's processing.
I used RestTemplate's postForEntity() with {"count":1,"requeue":true,"encoding":"auto"} as request body. But strangely rabbitmq-server isn't responding for this API, however its responding for other API endpoint in the doc.
If there's any way to get the status of the listener, please share the details. Thanks in advance.
Spring AMQP listener containers emit a ListenerContainerIdleEvent objects when there is no messages during some interval.
See docs for more info: https://docs.spring.io/spring-amqp/docs/2.1.7.RELEASE/reference/html/#idle-containers
For the RabbitMQ REST API, there is a Java wrapper - Hop: https://github.com/rabbitmq/hop
So, consider to use its Client.getQueue(String vhost, String name) for your goal, if a ListenerContainerIdleEvent doesn't fit your requirements.

iib 10 missing message on the local mq queue using mqoutput node

I'm newbie on IBM tool.
On my laptop, I have installed IIB v10 using a local MQ manager. I created 2 local queues on MQ: "Queue.In" and "Queue.Out".
I have a very simple scenario that I work on: I send a 'csv' file on the "Queue.In", get the message using 'MQInput node' transform the message into xml using 'mapping node', and then put the xml message to 'Queue.Out'.
Using the ‘flow exercicser’ I’m able to send my ‘csv’ file and I can see that the message get consumed and transformed to xml and send to “Queue.Out”
Problem: My xml message is successfully put in "Queue.Out", but disappear right after.
I want it to remain in the "Queue.Out".
I use “MQ explorer” to browse my queues.
Please advice.
I would always recommend using Rfhutil for Delivery and Subscription of messages onto/out of a queue. In Rfhutil you can also browse messages without taking them off the queue which can be useful.
I am unsure why the flow exerciser removes messages - this is a new feature in IIB10 so it might be that they wanted queues to be cleared after the flow execution has been completed to avoid clogging queues. I believe the point of the exerciser is to track the logic of the flows themselves not to get messages.
Hope this helps :)

How to retrieve all the messages present in the solace queue

I want to know how do I retrieve the messages already present on the Solace Queue. I am able to send and receive the messages I created from my machine but can't receive any messages that are already present in the queue. I want to retrieve the messages and store it in a text file.
I am sending my messages by integrating Solace APIs in Gradle and writing code in Java. Can anyone guide me regarding the same?
There's an exact tutorial for this.
If you had downloaded the Solace Java JAR via the Maven links, you might have missed the entire suite, which contains all the dependent JARs distributed by Solace, API reference docs, as well as a bunch of samples. The latter is in addition to what you may find on http://dev.solace.com/get-started/java-tutorials/. Get the entire ZIP file, as well as the Release Notes, from http://dev.solace.com/downloads/.
There are multiple possibilities why you cannot receive messages from a queue:
Queue name is misspelt.
Queue permissions are wrong.
Queue is shut down on the egress.
Message spool is not active on the router.
Client profile is set not to receive Guaranteed Messages.
Number of egress flows has exceeded the router / message-vpn limit.
Bind count on the queue has exceeded.
The egress flow is not active.
Client is not connected to the router.
...
Examining the error / exception will give you information why you cannot receive messages.

Resources