Azure / Azure/azure-service-bus-java

CoreMessageReceiver.returnMesagesLoopDaemon is being executed too often causing higher CPU consumption

Open
#405 0 comments 0 reactions 1 assignee Claimed by @yvgopal View on GitHub
Dominant language
Java
Stars
62
Forks
63
PR merge metrics
No merged PRs in 30d

Description

## 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 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)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.