activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Lichtin <>
Subject Performance issue in FilePendingMessageCursor.isEmpty()
Date Sat, 09 Apr 2016 17:51:42 GMT
With a test sending 5000 messages to a queue, I see heavy CPU use on the broker side (v 5.12.2).
Using Yourkit it shows that the hot spot methods are

FilePendingMessageCursor.isEmpty() iterates over in-memory messages and therefore (as it is
a prioritized queue) uses PrioritizedPendingListIterator which uses OrderedPendingList.getAsList()
which turns out to be an expensive method as it converts the self-managed linked list to a
Java ArrayList.

I wonder if anyone else has seen this issue?

Perhaps PrioritizedPendingListIterator could be improved to walk the priority lists via OrderedPendingList
iterators, as these are implemented efficiently.

- Martin

View raw message