We are using a network of brokers as described in (http://activemq.apache.org/networks-of-brokers.html).
In our test we have setup three AMQ configurations:
lazy val jmsConfa = jms
.connectionFactoryName(“ConnectionFactory”)
.url(amqServera)
.credentials(amqUsr, amqPwd)
.disableAnonymousConnect
.contextFactory(classOf[ActiveMQInitialContextFactory].getName)
.listenerCount(1)
.receiveTimeout(30000)
.usePersistentDeliveryMode
.messageMatcher(IdentificationMatcher)
lazy val jmsConfb = jms
.connectionFactoryName(“ConnectionFactory”)
.url(amqServerb)
.credentials(amqUsr, amqPwd)
.disableAnonymousConnect
.contextFactory(classOf[ActiveMQInitialContextFactory].getName)
.listenerCount(1)
.receiveTimeout(30000)
.usePersistentDeliveryMode
.messageMatcher(IdentificationMatcher)
lazy val jmsConfc = jms
.connectionFactoryName(“ConnectionFactory”)
.url(amqServerc)
.credentials(amqUsr, amqPwd)
.disableAnonymousConnect
.contextFactory(classOf[ActiveMQInitialContextFactory].getName)
.listenerCount(1)
.receiveTimeout(30000)
.usePersistentDeliveryMode
.messageMatcher(IdentificationMatcher)
They are identical, the only thing that is different is the url wich connects to different AMQ brokers in the same network.
Our listeners use the following message matcher.
object IdentificationMatcher extends JmsMessageMatcher {
override def prepareRequest(msg: Message): Unit = {}
override def requestMatchId(msg: Message): String = {
return msg.getStringProperty(“GIMTrackingId”)
}
override def responseMatchId(msg: Message): String = {
return msg.getStringProperty(“ID”)
}
}
In our Simulation we use:
val jmsLoad = scenario(“JMS Load AMQA”).
repeat(1) {
JmsScenarios.createAndPostJmsMessage
}
val jmsLoadb = scenario(“JMS Load AMQB”).
repeat(1) {
JmsScenarios.createAndPostJmsMessage
}
val jmsLoadc = scenario(“JMS Load AMQC”).
repeat(1) {
JmsScenarios.createAndPostJmsMessage
}
And then finally inject like so:
setUp(
jmsLoad.inject(
constantUsersPerSec(jmsMessagesPerSecond).during(loadTime)).
protocols(JSMConfig.jmsConfa),
jmsLoadb.inject(
constantUsersPerSec(jmsMessagesPerSecond).during(loadTime)).
protocols(JSMConfig.jmsConfb),
jmsLoadc.inject(
constantUsersPerSec(jmsMessagesPerSecond).during(loadTime)).
protocols(JSMConfig.jmsConfc)
).
maxDuration(loadTime + 10).
assertions(global.successfulRequests.percent.greaterThan(99),
global.responseTime.max.lessThan(60000))
However this is not working as expected, this is the problems we are having:
-
During the test number of active users are increasing BUT there are no queues building up, so the only explanation we can find is that the topic reply gets lost so that gatling never gets them.
-
When the test ends and there are still active users they are not reported as errors by gatling, we would like to make sure that when a test ends there are no active users left.
-
Is there a way to use gatling as only a load generator, that is have gatling NOT care about replys on the topic, this would help since now the number of active user increse untill the load test crashes with out of memory when we reach around 10000active users.