views:

148

answers:

1

Hi.

I am using apache servicemix and apache activeMQ in my product. Here in case of HttpConnector i found a performance issue.

If i increase number of total request at a time then as the number will increase exchange queue gets stuck on any of the component. After all the requests start processing, most of the exchange gets stuck at the end component or at the dispatcher* component. Container's heap size reaches to very high and after some time it crashes and restarts automatically.

I have used transactionmanager also. flowname is also mentioned as jms.

need some solution urgently.

A: 

Hi

If i increase number of total request at a time then as the number will increase exchange queue gets stuck on any of the component.

ActiveMQ has a mechanism to stop producer writing messages, it is called "flow controll", seems that you producer is faster than consumer (or consumer is not stable it its speed), so first check the memoryLimit config for your AMQ (also defining it or special queue possible). Try to increase it.

<destinationPolicy>
  <policyMap>
    <policyEntries>

      <policyEntry topic="FOO.>" producerFlowControl="false" memoryLimit="1mb">
        <dispatchPolicy>
          <strictOrderDispatchPolicy/>
        </dispatchPolicy>
        <subscriptionRecoveryPolicy>
          <lastImageSubscriptionRecoveryPolicy/>
        </subscriptionRecoveryPolicy>
      </policyEntry>

    </policyEntries>
  </policyMap>

Also, you can disable that stopping of processing incoming messages with producerFlowControl="false" option. So, in case when all buffer will be used, AMQ will slow down and all messages will be stored to HD. More info Producer Flow Control and Message Cursors

Container's heap size reaches to very high and after some time it crashes and restarts automatically.

But anyway, it is just way of tunning of your app, it is not solution, because always you will have the case when some resources run out :)

You should limit the incoming requests or balance them f.e. using Pound

zaletniy