Jms simulation scenario with multiple exec are failing to publish

When I am using JMS simulation, I am getting the error

‘jmsSend-2’ crashed with ‘j.j.IllegalStateException: Producer is closed’, forwarding to the next one

In this case I am using a scenario which has multiple exec blocks. My intention is to publish 3 different messages to a topic but under the same session because I want a unique id in the message payload to remain same for all the 3 messages. The code is written using java dsl and it looks like below

ScenarioBuilder scenario = scenario(“Scenario”)
.exec(jms(“publish message 1”).send()
.exec(jms(“publish message 2”).send().destination(topic(“myTopic”))
.exec(jms(“publish message 3”).send()


If I use only one exec block, this is working fine. I am new to gatling, could you please help.

Gatling version: 3.9.2

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.