I have a simulation with this JMSConfiguration:
val jmsConfig = jms
.connectionFactoryName(“ConnectionFactory”)
.url(“tcp://amq1.lnx.example.com:61616”)
.credentials(“admin”, “password”)
.contextFactory(classOf[ActiveMQInitialContextFactory].getName)
.listenerCount(1)
.usePersistentDeliveryMode
While “jaasAuthenticationPlugin” is enabled in activemq.xml this fails with the exception posted below indicating that the username is “null” or password is invalid.
In the broker logs I also see:
2015-09-14 13:45:46,359 | INFO | e[amq1] Task-153 | TransportConnection | emq.broker.TransportConnection$3 1076 | 121 - org.apache.activemq.activemq-osgi - 5.9.0.redhat-611442 | Stopping tcp://192.168.102.11:35546 because Failed with SecurityException: User name [null] or password is invalid.
In the docs I can see the option: "disableAnonymousConnect
optional, by default, connection won’t use the above credentials".
If I try to change my jmsConfig to:
val jmsConfig = jms
.connectionFactoryName(“ConnectionFactory”)
.url(“tcp://amq1.lnx.example.com:61616”)
.credentials(“admin”, “password”)
.contextFactory(classOf[ActiveMQInitialContextFactory].getName)
.listenerCount(1)
.usePersistentDeliveryMode
.disableAnonymousConnect
I get this error:
4:25:51.557 [ERROR] i.g.c.ZincCompiler$ - /home/gatling/gatling-charts-highcharts-bundle-2.1.7/user-files/simulations/amq/AMQInboundOutboundSimulation.scala:17: value disableAnonymousConnect is not a member of io.gatling.jms.JmsProtocolBuilder
possible cause: maybe a semicolon is missing before
value disableAnonymousConnect’?`