Configuring number of connections using JMS protocol

Hi all,

Is there a way of specifying the number of connections when using JMS?

I can obv control the number of messages injected but how do I spread the load across multiple connections?

While executing the below all messages go through single connection


val jndiBasedConnectionFactory = jmsJndiConnectionFactory
.credentials(“admin”, “admin”)

val jmsConfig = jms

val feeder = MessagesFeeder.feedMessages().map(message => Map(“message” → message)).queue

val scn = scenario(“All at once messages”).feed(feeder).
exec(jms(“Send message”).send

setUp(scn.inject( atOnceUsers(10)))



That’s indeed a bug, see

User constantUsersPerSec to balance users instead of atOnceUsers.

Stéphane Landelle

GatlingCorp CTO

Hi Stephane,

Thank you for getting back to me.

It seems like constantUsersPerSec wont work for JMS (just tried) and it’ll be posting message through single connection as its only one connection created per execution


Can’t say of much of an issue this is for regular JMS implementations.
We’ve run tests with modern ActiveMQ and Artemis on our side, and some users use IBM MQ and every time throughput was excellent.

Hi Glib, I am facing the issue, were you able to find any solution for this?

We do not seem to have a way to specify multiple connections using JMS protocol, Is there a workaround to spawn multiple connections?
using constantUsersPerSec or rampUpUsersPerSec all are just adding a few random sessions to a single connection, but we are not able to get multiple connections established using any of the methods.