activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Burton <>
Subject More ActiveMQ hotspots.. courtesy of continuous profiling :)
Date Tue, 02 Jun 2015 03:02:54 GMT
We deployed a continuous profiler at work today and so far the results look
really interesting.

Definitely worth the investment to setup!

Look like we’re spending 50% of our time here:

    public void removeConsumer(ConnectionContext context, ConsumerInfo
info) throws Exception {
        for (Subscription sub : subscriptionMap.keySet()) {
            if (sub.getConsumerInfo().equals(info)) {
               // unregister all consumer subs
               unregisterSubscription(subscriptionMap.get(sub), true);
        super.removeConsumer(context, info);

… so I think a patch for that could be to keep an index around for a map
from ConsumerInfo to Subscription… then unregisterSubscription just has to
factor that in as well.

Another hotspot seems to be:

We seem to be spending 5% of our CPU time here due to sorting a list, which
I think can be eliminated.

But 5% isn’t that bad.

There’s also this:,

but it was a small impact and looks harder to optimize.


Location: *San Francisco, CA*
… or check out my Google+ profile

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message