Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-890

JMS Request and Reply pattern unable to handle more than 30 threads concurrently.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • JBoss A-MQ 6.1
    • JBoss A-MQ 6.1
    • None
    • None

    Description

      1. I've created a jmeter test case that tries to mimic the scenario
      2. Here is the route I have[1]. As you can see that it has 2 queues (queue1 and queue2) route2 will consume the message and transform (return and a new message) and you will see the response message back if every works.
      3. Take a look at the jmeter script (ActiveMQ_Load_Test.jmx), you will need to first download jmeter and open this file.
      3.1 In order to get jmeter to work with ActiveMQ, you will need to copy the activemq-all.jar to the jmeter/lib folder.
      3.2 In "Thread Group" this is where you can set up the number of users and how many rounds of call.
      3.3 In the "JMS Request and Reply" branch, they is where you create the jms call (this is similar to your Stomp client), and I point to queue1 and you can change that to portal.
      3.4 In "Response Assertion" it is just a simple junit test to make sure the response is transformed. It expects to see (Transformed and return "test"). So, now we can know if we get response and the response is indeed be through route2.
      3.5 Deploy the camel routes and starts the jmeter.Here is the interesting findings, when I have a 30 users/threads it works, but when I increase it to 50 it starts having warnings like this:[2]Plus, my JMeter clients are at stale (the threads are running but nothing happens b/c it is waiting on a response and if you look at the temp queue, it has a bunch subscribers. I think once it start the request, camel hits an error[2], but the client has created a temp queue and waiting on a response. Now, if the client didn't get time out or release the temp queue or quit, it will just subscribe to the temp queue forever.[1]
      <?xml version="1.0" encoding="UTF-8"?>
      <!-- Configures the Camel Context --><beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:amq="http://activemq.apache.org/schema/core"
      xsi:schemaLocation="
      http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd\\
      http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd\\
      http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"><!-- This creates an embedded ActiveMQ Broker -->
      <!-- <broker xmlns="http://activemq.apache.org/schema/core" useJmx="true"
      persistent="false"> -->
      <!-- <transportConnectors> -->
      <!-- <transportConnector uri="tcp://localhost:61616" /> -->
      <!-- </transportConnectors> -->
      <!-- </broker> -><!- Lets connect the Camel ActiveMQ component to the embedded broker. See
      http://camel.apache.org/activemq.html for more information. -->
      <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
      <property name="brokerURL" value="failover://tcp://localhost:61616?jms.prefetchPolicy.queuePrefetch=1" />
      <property name="userName" value="admin" />
      <property name="password" value="admin" />
      </bean><!-- Here is a sample which processes the input files (leaving them in placesee the 'noop' flag), and sends them on a JMS queue. This queue is watched
      by another route which then performs content based routing on the messages
      using XPath. -->
      <camelContext xmlns="http://camel.apache.org/schema/spring">
      <route id="route1">
      <from uri="activemq:queue1?concurrentConsumers=10&asyncConsumer=true" />
      <to uri="activemq:queue2" />
      </route>
      <route id="route2">
      <from uri="activemq:queue2?concurrentConsumers=10&asyncConsumer=true" />
      <delay><constant>5000</constant></delay>
      <transform>
      <simple>Transformed and return "$

      {body}

      "</simple>
      </transform>
      <log message="Got ${body} " />
      </route>
      </camelContext></beans>[2]
      [oraryQueueReplyManager[queue2]] TemporaryQueueReplyManager WARN Reply received for unknown correlationID[Camel-ID-rwhui-pc-53409-1418626550620-0-626]. The message will be ignored: ActiveMQTextMessage {commandId = 510, responseRequired = true, messageId = ID:rwhui-pc-52371-1418626551234-3:1:8:1:24, originalDestination = null, originalTransactionId = null, producerId = ID:rwhui-pc-52371-1418626551234-3:1:8:1, destination = temp-queue://ID:rwhui-pc-52371-1418626551234-5:1:1, transactionId = null, expiration = 0, timestamp = 1418627098550, arrival = 0, brokerInTime = 1418627098551, brokerOutTime = 1418627098551, correlationId = Camel-ID-rwhui-pc-53409-1418626550620-0-626, replyTo = temp-queue://ID:rwhui-pc-52371-1418626551234-5:1:1, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = org.apache.activemq.util.ByteSequence@67245a95, marshalledProperties = org.apache.activemq.util.ByteSequence@3b7211a, dataStructure = null, redeliveryCounter = 0, size = 0, properties =

      {CamelJmsDeliveryMode=2, breadcrumbId=ID:rwhui-pc-57709-1418625949998-375:1:1:1:2}

      , readOnlyProperties = true, readOnlyBody = true, droppable = false, jmsXGroupFirstForConsumer = false, text = Transformed and return "test"}[2]
      TemporaryQueueReplyManager WARN Timeout occurred after 20000 millis waiting for reply message with correlationID[Camel-ID-rwhui-pc-53409-1418626550620-0-626]. Setting ExchangeTimedOutException on (MessageId: ID:rwhui-pc-57709-1418625949998-375:1:1:1:2 on ExchangeId: ID-rwhui-pc-53409-1418626550620-0-718) and continue routing.

      Attachments

        Activity

          People

            gtully@redhat.com Gary Tully
            rhn-support-whui Roger Hui
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: