简体   繁体   中英

How to filter response messages from ActiveMQ for subscribers in JMeter using JMS Publisher and JMS Subscriber

I'm creating a load test where I try to sent three types of JSON messages through ActiveMQ topic to server. After sending first message I get 3 responses, sending second - get 2 responses according to business logic. One iteration sequentially:

  • publish message1
  • consume 3 responses as a result of successful processing message1
  • publish message2
  • consume 2 responses as a result of successful processing message2
  • etcetera

I need to start 50 parallel iterations and not to confuse messages from different iterations. How can I do it? I tried JMS selector but this one can filter messages by the headers only. I don't have any specific headers for each responses to get. Can I filter messages, for example, by UUID? And how it can be implemented? I tried to find needed info on Internet but without results.

Will be very thankful for advices and help with it!

Yes, messages can be filtered by either header (fixed set of JMS header names) or by property (custom key-value pair).

JMSCorrelationID may be a good bet here. You can publish all messages for a given producer (or iteration) w/ the same JMSCorrelationID and then check the consumer counts that way.

ie.. for producer1 set: JMSCorrelationID = 'producer-1' for producer2 set: JMSCorrelationID = 'producer-2'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM