Gatling 2.3.0 JMS with multiple reply messages (memory use and message matching)

Hi,

We’re using gatling 2.3.0 to submit messages to MQ via JMS. It works incredibly well and has made our lives much easier!

That said, we’re seeing ever increasing memory use during a run…

We submit to a queue and wait for a reply message on another replyQueue. Our system actually generates multiple replies, kind-of a “started”, “half-way”, “done”. We’re interested in the response time to the third reply (“done”).

Our current implementation extends JmsMessageMatcher to look for two things with a message:

  • the ref number (to match to our original request)

  • a code that tells us it’s the “done” message.

and concatenates them.

This works, but in longer tests we see ever increasing memory use. Presumably because we are keeping hold of the “started” and “half-way” messages that are not matched by our JmsMessageMatcher (hprof analysis shows we have a hashmap with loads of messages in at least).

Can anyone suggest a way to deal with this? The other two messages can be discarded. Only the “done” message is important to us.

Is there a way to match between to multiple replies?

Cheers,
Simon