JMS DSL

Traveling atm. IIRC, AMQ doesn’t use the standard correlation id. Check the documentation.

Did you configure the reply destination? http://gatling.io/docs/2.1.6/jms.html#destination

Are you saying that .queue(“requestQueue”).replyQueue(“responseQueue”) doesn’t work while .destination(queue(“requestQueue”)).replyDestination(queue(“responseQueue”)) does?

It should be the exact same thing, the first form is just a short cut.

Super weird o_0

queue(“foo”) is an alias for destination(queue(“foo”))
and replyQueue(“foo”) is an alias for replyDestination(queue(“foo”))

https://github.com/gatling/gatling/blob/master/gatling-jms/src/main/scala/io/gatling/jms/request/JmsRequestBuilder.scala#L34

https://github.com/gatling/gatling/blob/master/gatling-jms/src/main/scala/io/gatling/jms/request/JmsRequestBuilder.scala#L47

Are you sure you have the proper queue names?
In your first commit, you were using different queues (“requestQueue” and “responseQueue”) and in the second one, you switch to a single queue (" loadTestQueue").
I think your sample/system under test uses a single queue for receiving and replying and your original set up was wrong.

No, the JMS model doesn’t enforce you to have different queues. It depends on your application.

The JMSCompileTest is, as its name states, a test to check that the DSL compiles. It’s not a functional sample.

In your case, it looks like the send and reply queues are the same.

Hi All,

I have only request queue name and do not have replyqueue name? How to proceed further. Is there any other way ??

Please help me

Thanks,
Santosh Kulkarn

Hi All ,

Even in my case , i dont have a replyQueue. And looks like thats causing my script to fail.
Please some one help.

my JMS config is ,

val jmsConfig = jms
  .connectionFactoryName(jmsConnectionFactory)
  .url(jmsUrl)
  .credentials(jmsUsername,jmsPwd)
  .disableAnonymousConnect
  .contextFactory(classOf[org.apache.activemq.jndi.ActiveMQInitialContextFactory].getName)
  .listenerCount(1)

Below is the stack trace.

[INFO ] i.g.j.c.SimpleJmsClient - Got Connection ActiveMQConnection {id=bbbbbbbb
Exception in thread “Thread-3” javax.jms.JMSSecurityException: User aaaaaaa is not authorized to read from ID:bbbbbbbb
at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:52)
at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1392)
at org.apache.activemq.ActiveMQSession.syncSendPacket(ActiveMQSession.java:2081)
at org.apache.activemq.ActiveMQMessageConsumer.(ActiveMQMessageConsumer.java:279)
at org.apache.activemq.ActiveMQSession.createConsumer(ActiveMQSession.java:1303)
at org.apache.activemq.ActiveMQSession.createConsumer(ActiveMQSession.java:1247)
at org.apache.activemq.ActiveMQSession.createConsumer(ActiveMQSession.java:1159)
at io.gatling.jms.client.SimpleJmsClient.createReplyConsumer(SimpleJmsClient.scala:91)
at io.gatling.jms.JmsReqReplyAction$ListenerThread$$anon$1.run(JmsReqReplyAction.scala:70)

My scenarion was as below ,

val scn = scenario("JMS test").repeat(1) {
  exec(jms("req reply testing").reqreply
    .queue(jmsQname)
    .textMessage("hello from gatling jms dsl")
    .property("test_header", "test_value")

If i add , .replyQueue(jmsQname) to the scenario , i dont get the security exception any more.
But i dont want the reply messages to go to a separate queue. Can the gatling receive the response from the queue instead ?
Is there any way i dont have to give the replyQueue in my scenario ?

If you don’t have reply messages, what do you entend on measuring to keep your service performance in check?

Hi Stephane,

Could you please advise how to receive the response from the queue? Currently my messages are sent to queue as expected, but gatling doesn’t count that as success, it stays on ‘Active’, not moving to ‘Done’.