Effective October 27, 2012, online and email support for FuseSource products will move to Red Hat support channels. For more information, please see the JIRA Migration to Red Hat FAQ.
As of October 27th, please open all new issues in the Red Hat Customer Portal .
Issue Details (XML | Word | Printable)

Key: MB-949
Type: Question Question
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Gary Tully
Reporter: Stan Livitski
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
FUSE Message Broker

Speeding up consumer transactions with ActiveMQ

Created: 25/Aug/11 04:41 PM   Updated: 15/Sep/11 09:03 AM
Component/s: broker
Affects Version/s: 5.4.2-fuse-03-00, 5.5.0-fuse-00-00
Fix Version/s: 5.5.1-fuse-00-06, 5.5.0-fuse-00-xx, 5.6.0-fuse-00-00

Environment:
Broker:
ActiveMQ 5.5
Java 6 (Sun JVM?)
Sun Solaris ?

Client:
ActiveMQ 5.4.2 (client library)
Camel 2.5.0
Spring 2.5.6
Websphere 6.1
Java 1.5 (IBM JVM ?)
Sun Solaris ?


External Issue URL: https://issues.apache.org/jira/browse/AMQ-2868


 Description  « Hide
A customer is having an issue with an ActiveMQ deployment that is blocking their production roll-out. The deployment that causes trouble consists of:
  • A producer application that reads many small messages from a large file and sends them to a queue. Each message is 2-3 kbytes long. The number of messages read from a file exceeds 100,000.
  • An ActiveMQ broker that hosts the queue that receives those messages. That queue stores messages persistently. The broker is configured to use an amqPersistenceAdapter.
  • The client is a Camel route inside a WebSphere container. The route performs business logic on each message received from the queue. The processing of a message takes roughly 1 second. The route uses Camel transactions to ensure complete processing of each message, and consumes messages from the queue in the transacted mode, 1 message per transaction.

To ensure processing of large files within reasonable time frames, the consumer is configured to use 80 threads. Initially, the threads were using a connection pool with maxConnections=10 and maximumActive=120. The customer claims that such configuration resulted in overall processing rate of 60 messages per second. However, messages were getting stuck in the pooled sessions after about 70,000 messages were processed.

I advised them to reduce the pool size to maxConnections=1 and maximumActive=80 (the number of threads) and set the pre-fetch limit to 1. That resolved the problem of stuck messages, but reduced the processing rate to about 13 messages per second. Thread dumps on the client show that most client threads are waiting for the broker to commit their transactions. Broker threads seem to be busy writing to disk. When they disable transactions, the processing rate goes back up, but they cannot do that in production.

Is it possible to tune the broker or client configuration to speed up transaction commits?



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Stan Livitski made changes - 25/Aug/11 04:42 PM
Field Original Value New Value
Link This issue is linked to DEV-3344 [ DEV-3344 ]
Stan Livitski made changes - 25/Aug/11 10:14 PM
Link This issue is linked from DEV-3380 [ DEV-3380 ]
Gary Tully made changes - 26/Aug/11 01:09 PM
Assignee Gary Tully [ gtully ]
Gary Tully made changes - 26/Aug/11 03:17 PM
Status Open [ 1 ] In Progress [ 3 ]
Gary Tully made changes - 31/Aug/11 01:50 PM
Gary Tully made changes - 01/Sep/11 01:53 PM
Status In Progress [ 3 ] Resolved [ 5 ]
Fix Version/s 5.6.0-fuse-00-00 [ 11370 ]
Resolution Fixed [ 1 ]
Gary Tully made changes - 14/Sep/11 10:56 AM
Fix Version/s 5.5.0-fuse-00-xx [ 11450 ]
Gary Tully made changes - 14/Sep/11 10:57 AM
Resolution Fixed [ 1 ]
Status Resolved [ 5 ] Reopened [ 4 ]
Gary Tully made changes - 15/Sep/11 09:03 AM
Status Reopened [ 4 ] Resolved [ 5 ]
Fix Version/s 5.5.1-fuse-00-xx [ 11454 ]
Resolution Fixed [ 1 ]