Hi All,
I am pretty new to scala and gatling. I’m trying to connect to a JMS queue on a JBOSS EAP 7 server.
Really need some guidance here.
Using the code below:
val connectionFactory = jmsJndiConnectionFactory
.connectionFactoryName(“jms/RemoteSSLConnectionFactory”)
.url(“https-remoting://127.0.0.1:8443”)
.credentials(“jmsuser”, “abc1234”)
.contextFactory(“org.jboss.naming.remote.client.InitialContextFactory”)
val jmsConfig = jms
.connectionFactory(connectionFactory)
.listenerThreadCount(1)
.usePersistentDeliveryMode
val scn = scenario(“JMS DSL test”).repeat(1) {
exec { session => session.set(“session-id”, UUID.randomUUID().toString())
}.exec(jms(“req reply testing”).requestReply
.queue(“t24TWSQueue”)
.replyQueue(“t24TWSReplyQueue”)
.textMessage(“Test Message”)
.jmsType(“test_jms_type”))
}
setUp(scn.inject(atOnceUsers(1)))
.protocols(jmsConfig)
Getting this error when I run:
09:41:58.428 [main][ERROR][Gatling.scala:76] i.g.a.Gatling$ - Run crashed
org.apache.activemq.artemis.api.core.ActiveMQConnectionTimedOutException: AMQ119013: Timed out waiting to receive cluster topology. Group:null
at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:797)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:744)
… 39 common frames omitted
Wrapped by: javax.jms.JMSException: Failed to create session factory
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:747)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:253)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:249)
at io.gatling.jms.client.JmsConnectionPool.$anonfun$jmsConnection$1(JmsConnectionPool.scala:39)
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
at io.gatling.jms.client.JmsConnectionPool.jmsConnection(JmsConnectionPool.scala:36)
at io.gatling.jms.action.JmsAction.(JmsAction.scala:50)
at io.gatling.jms.action.RequestReply.(RequestReply.scala:50)
at io.gatling.jms.action.RequestReplyBuilder.build(RequestReplyBuilder.scala:36)
at io.gatling.core.structure.BuildAction.$anonfun$build$1(BuildAction.scala:25)
at scala.collection.LinearSeqOptimized.foldLeft(LinearSeqOptimized.scala:126)
at scala.collection.LinearSeqOptimized.foldLeft$(LinearSeqOptimized.scala:122)
at scala.collection.immutable.List.foldLeft(List.scala:89)
at io.gatling.core.structure.BuildAction.build(BuildAction.scala:24)
at io.gatling.core.structure.BuildAction.build$(BuildAction.scala:23)
at io.gatling.core.structure.ChainBuilder.build(ChainBuilder.scala:26)
at io.gatling.core.action.builder.LoopBuilder.build(LoopBuilder.scala:61)
at io.gatling.core.structure.BuildAction.$anonfun$build$1(BuildAction.scala:25)
at scala.collection.LinearSeqOptimized.foldLeft(LinearSeqOptimized.scala:126)
at scala.collection.LinearSeqOptimized.foldLeft$(LinearSeqOptimized.scala:122)
at scala.collection.immutable.List.foldLeft(List.scala:89)
at io.gatling.core.structure.BuildAction.build(BuildAction.scala:24)
at io.gatling.core.structure.BuildAction.build$(BuildAction.scala:23)
at io.gatling.core.structure.ScenarioBuilder.build(ScenarioBuilder.scala:38)
at io.gatling.core.structure.PopulationBuilder.build(ScenarioBuilder.scala:101)
at io.gatling.core.scenario.SimulationParams.$anonfun$scenarios$1(Simulation.scala:192)
at scala.collection.immutable.List.map(List.scala:286)
at io.gatling.core.scenario.SimulationParams.scenarios(Simulation.scala:192)
at io.gatling.app.Runner.run0(Runner.scala:91)
at io.gatling.app.Runner.run(Runner.scala:60)
at io.gatling.app.Gatling$.start(Gatling.scala:73)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:46)
at io.gatling.app.Gatling$.main(Gatling.scala:38)
at io.gatling.app.Gatling.main(Gatling.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
Caused by: javax.jms.JMSException: Failed to create session factory
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:747)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:253)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:249)
at io.gatling.jms.client.JmsConnectionPool.$anonfun$jmsConnection$1(JmsConnectionPool.scala:39)
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
at io.gatling.jms.client.JmsConnectionPool.jmsConnection(JmsConnectionPool.scala:36)
at io.gatling.jms.action.JmsAction.(JmsAction.scala:50)
at io.gatling.jms.action.RequestReply.(RequestReply.scala:50)
at io.gatling.jms.action.RequestReplyBuilder.build(RequestReplyBuilder.scala:36)
at io.gatling.core.structure.BuildAction.$anonfun$build$1(BuildAction.scala:25)
at scala.collection.LinearSeqOptimized.foldLeft(LinearSeqOptimized.scala:126)
at scala.collection.LinearSeqOptimized.foldLeft$(LinearSeqOptimized.scala:122)
at scala.collection.immutable.List.foldLeft(List.scala:89)
at io.gatling.core.structure.BuildAction.build(BuildAction.scala:24)
at io.gatling.core.structure.BuildAction.build$(BuildAction.scala:23)
at io.gatling.core.structure.ChainBuilder.build(ChainBuilder.scala:26)
at io.gatling.core.action.builder.LoopBuilder.build(LoopBuilder.scala:61)
at io.gatling.core.structure.BuildAction.$anonfun$build$1(BuildAction.scala:25)
at scala.collection.LinearSeqOptimized.foldLeft(LinearSeqOptimized.scala:126)
at scala.collection.LinearSeqOptimized.foldLeft$(LinearSeqOptimized.scala:122)
at scala.collection.immutable.List.foldLeft(List.scala:89)
at io.gatling.core.structure.BuildAction.build(BuildAction.scala:24)
at io.gatling.core.structure.BuildAction.build$(BuildAction.scala:23)
at io.gatling.core.structure.ScenarioBuilder.build(ScenarioBuilder.scala:38)
at io.gatling.core.structure.PopulationBuilder.build(ScenarioBuilder.scala:101)
at io.gatling.core.scenario.SimulationParams.$anonfun$scenarios$1(Simulation.scala:192)
at scala.collection.immutable.List.map(List.scala:286)
at io.gatling.core.scenario.SimulationParams.scenarios(Simulation.scala:192)
at io.gatling.app.Runner.run0(Runner.scala:91)
at io.gatling.app.Runner.run(Runner.scala:60)
at io.gatling.app.Gatling$.start(Gatling.scala:73)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:46)
at io.gatling.app.Gatling$.main(Gatling.scala:38)
at io.gatling.app.Gatling.main(Gatling.scala)
… 6 more
Caused by: ActiveMQConnectionTimedOutException[errorType=CONNECTION_TIMEDOUT message=AMQ119013: Timed out waiting to receive cluster topology. Group:null]
at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:797)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:744)
… 39 more