Search code examples
javaperformancejmsloadrunnermq

LR JAVA MQ Script for capturing 2 response for 1 request from same Message queue


We have a scenario where LR JAVA MQ Script needs to capture 2 responses for one request, 1st is ACK while 2nd is response from same queue..I am familiar with regular JAVA MQ Script where we capture one response for one request, however facing issues with this particular scenario. Can you please advise on how can we enhance our existing script in order to capture both response one by one sequentially.

Thanks in Advance


Solution

  • Think about what your MQ client is doing. There are several possibilities:

    1. The client reads the queue twice for two different items
    2. The Ack is for a submission onto a queue. The data is a response on the same or different queue
    3. The first response is synchronous with a push onto a queue, while the second is asynchronous and is pushed to the client by another process which reads it from the queue and then sends to a listener already in place on the client.

    Once you clarify which of the three possibilities (of which admittedly there may be more) then you will understand how to structure your virtual user to represent the client behavior to reproduce this series of data flows.

    Grab a protocol analyzer, or perhaps even record your client with a Windows Sockets virtual user and examine the data.ws sockets flows, as part of your analyis