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
.connectionFactoryName(“ConnectionFactory”)
.url(System.getProperty(“tcp://localhost:61616”))
.credentials(“admin”, “admin”)
.contextFactory(“org.apache.activemq.jndi.ActiveMQInitialContextFactory”)

val jmsConfig = jms
.connectionFactory(jndiBasedConnectionFactory)
.usePersistentDeliveryMode

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

val scn = scenario(“All at once messages”).feed(feeder).
exec(jms(“Send message”).send
.queue(System.getProperty(“queue_name”))
.textMessage("${message}"))

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

`

Regards,
Glib

That’s indeed a bug, see https://github.com/gatling/gatling/issues/3688.

User constantUsersPerSec to balance users instead of atOnceUsers.

Stéphane Landelle

GatlingCorp CTO
slandelle@gatling.io

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 https://github.com/gatling/gatling/blob/d51aa9e3d07ab9ec4a134e8c98835d4d6d51e177/gatling-jms/src/main/scala/io/gatling/jms/client/JmsConnectionPool.scala#L36

Regards,
Glib

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.