CoreMessageReceiver.returnMesagesLoopDaemon is scheduled to be executed every millisecond even if there are neither prefetched messages nor pending receivers, causing unnecessary higher CPU usage.
Expected Behavior
Solution to this could be to use blocking queue and its take() method or poll(time, unit) instead of poll() for prefetchedMessages and pendingReceives collections.
Versions
OS platform and version: Windows 10 enterprise
Maven package version or commit ID: 3.2.0 (related code looks the same as in version 3.4.0)
Actual Behavior
CoreMessageReceiver.returnMesagesLoopDaemon is scheduled to be executed every millisecond even if there are neither prefetched messages nor pending receivers, causing unnecessary higher CPU usage.
Expected Behavior
Solution to this could be to use blocking queue and its
take()
method orpoll(time, unit)
instead ofpoll()
forprefetchedMessages
andpendingReceives
collections.Versions