1

Created 2 samplers: JMS publisher and JMS Subscriber JMS Publisher send msgs on one queue and JMS subscriber listens msgs on another topic. How can I link these msgs to show latency??

AUT is multithreaded and order is not guaranteed on Topic.

0
  1. You could save message ID or another unique message attribute into a JMeter Variable in the JMS Publisher along with the current timestamp

  2. Whenever the message arrives to the JMS Subscriber you can check the attribute from the step 1 and obtain the timestamp at the time of sending. Then you can subtract the timestamp2 from the timestamp1 and the resulting value would be the "latency" you're looking for.

JMeter Functions you might be interested in:

  • __time() - gets current time in Unix timestamp format and stores it into a JMeter Variable with the given name
  • __longSum() - sums given numbers (or subtracts if one of them is negative) and stores the result into a JMeter Variable

You can also consider using sample_variables property to store the calculated delta value into .jtl result file and eventually plot it at the reporting dashboard

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.