Cannot use JMS credentials in Gatling 3.2

Hey,

I am trying to load test a JMS queue using a Gatling 3.2. I get the error “javax.jms.JMSSecurityException: Failed to connect to any server”. However the credentials are correct and work perfectly fine when I use Gatling 2.3. Gatling 3.2 does not see the configuration property “.disableAnonymousConnect” which I use in Gatling 2.3 after the credentials. Any help with this would be great. I putting my code below.

package com.app.simulations

import java.nio.charset.StandardCharsets
import java.util.concurrent.TimeUnit

import com.typesafe.config.ConfigFactory
import io.gatling.core.Predef._
import io.gatling.http.Predef.{http, status}
import io.gatling.jms.Predef._
import javax.jms._

import scala.concurrent.duration
import scala.concurrent.duration._
import com.tibco.security.ObfuscationEngine
import io.gatling.core.feeder.Feeder

class FeedbackTest extends Simulation{

  var utils : Utils = new Utils()

  val jndiBasedConnectionFactory = jmsJndiConnectionFactory
    .connectionFactoryName(connectionFactoryName)
    .url(utils.jmsURL)
    .contextFactory(utils.initialContextFactory)

  val jmsConfig = jms
    .connectionFactory(jndiBasedConnectionFactory)
    .credentials(utils.jms_UserName, utils.jmsPassword)
    .listenerThreadCount(1)
    .usePersistentDeliveryMode

  val scn = scenario("load test")
    .feed(feeder)
    .exec(jms("216 testing").send
      .queue(utils.pox_feedbackQueueName)
      .textMessage(utils.generateFeedbackMsg("${uuid}"))
      .property(utils.pox_jmsHeaderName, utils.pox_jmsHeaderValue)
      .jmsType("test"))

  setUp(
    scn.inject(
      atOnceUsers(1),
//      rampUsers(10) during (5 seconds),
      constantUsersPerSec(*10*) during (*2* minutes)
  ).protocols(jmsConfig)
  )
}

disableAnonymousConnect was dropped in Gatling 3, we considered there was no reason to ignore provided credentials when connecting.

You can check here: https://github.com/gatling/gatling/blob/master/gatling-jms/src/main/scala/io/gatling/jms/jndi/JmsJndiConnectionFactoryBuilder.scala#L69-L72

I’m afraid we can’t investigate without being able to reproduce on our side.
Please consider providing a simulation and a docker image with a JMS broker.