Hi Raymond-

One other thing I meant to mention— if you have a pure performance use case, at 
some point Apache Camel becomes the bottleneck, and you may need to consider 
converting those routes to pure Java.

Matt Pavlovich

> On Apr 2, 2025, at 10:27 AM, Matt Pavlovich <mattr...@apache.org> wrote:
> 
> Hi Raymond-
> 
> Others have reported similar results when comparing Artemis and Classic 
> recently. 
> 
> For ActiveMQ Classic, the out-of-the-box settings are designed to handle all 
> sorts of scenarios, but it is definitely not tuned for performance.. 
> 
> I suspect you can increase your ActiveMQ Classic numbers with a few tweaks.
> 
> 1. The default 1mb memory limit per-queue may be a limiting factor — try 
> increasing that.
> 2. Enable <policyEntry queue=“>” optimizedDispatch=“true” when using 
> concurrent consumers
> 3. Enable async index writes <kahaDB .. enableIndexWriteAsync=“true”
> 4. Use nio:// on the server side to handle more queues/topics and/or more 
> connections
> 
> Producers using AUTO_ACK configure ActiveMQConnectionFactory:
> a. For insanely fast performance — turn on useAsyncSend=true
> 
> Consumers using AUTO_ACK configure ActiveMQConnectionFactory:
> a. optimizeAcknowledge=true
> b. alwaysSessionAsync=false
> 
> Let us know how it goes!
> 
> Thanks,
> Matt Pavlovich
> 
>> On Apr 1, 2025, at 5:54 AM, ski n <raymondmees...@gmail.com> wrote:
>> 
>> Hi ActiveMQ community,
>> 
>> I have an environment where I communicate a lot between Apache Camel and
>> Apache ActiveMQ. Currently, I use Classic as broker, but I used Artemis in
>> other environments before. Mostly I just take the default settings (with a
>> few small tweaks) and let it run.
>> 
>> Currently, I try to optimize broker communication, and to learn more about
>> broker configuration and tuning. As a starting point, I created a typical
>> Camel integration with 10 routes that connects through ActiveMQ. I ran this
>> on my laptop. On the Camel side, I use both the JMS client (Spring based)
>> and the SJMS (Pure JMS). The camel routes, broker configs, and systeminfo
>> are in this gist:
>> 
>> https://gist.github.com/skin27/485fcfe4886260ffa1047eb4843e2cb3
>> 
>> Both ActiveMQ Classic and ActiveMQ Artemis I ran embedded in a Spring Boot
>> application as a single node. These were the first results (average in
>> milliseconds per run):
>> 
>> Pure Camel (In-memory/No Broker): ~1 ms
>> 
>> Classic
>> 
>> Camel JMS client: 17 ms
>> Camel SJMS client: 30 ms
>> 
>> Camel Pooled JMS client: 13 ms
>> Camel Pooled SJMS client: 21 ms
>> 
>> Artemis
>> 
>> Camel JMS client: 27 ms
>> Camel SJMS client: 40 ms
>> 
>> Camel Pooled JMS client: 44 ms
>> Camel Pooled SJMS client: 33 ms
>> 
>> Are these results that are expected based on my setup?
>> 
>> Of course, I already looked at the performance tuning guide:
>> 
>> Artemis:
>> https://activemq.apache.org/components/artemis/documentation/latest/perf-tuning.html
>> Classic:
>> https://activemq.apache.org/components/classic/documentation/performance-tuning
>> 
>> I already tried out multiple consumers, async and pooledConnection. If you
>> however based on my setup:
>> 
>> Camel <---> Embedded ActiveMQ
>> 
>> have a few tips which I can try out, I appreciate it.
>> 
>> Thanks,
>> 
>> Raymond
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@activemq.apache.org
> For additional commands, e-mail: users-h...@activemq.apache.org
> For further information, visit: https://activemq.apache.org/contact
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@activemq.apache.org
For additional commands, e-mail: users-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact


Reply via email to