Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent Behavior of getLockedUntil() Method for Messages Received from Azure Service Bus Queue #430

Open
RDPerera opened this issue Aug 31, 2023 · 0 comments

Comments

@RDPerera
Copy link

Issue Description:

After receiving a message from an Azure Service Bus Queue using the Java SDK, we have observed inconsistent behavior in the getLockedUntil() method. This method is supposed to return the fixed time indicating the peek lock expiration time for a received message. However, in some cases, the time returned by this method changes after a certain duration, which contradicts the expected behavior.

Steps to Reproduce:

Use the Azure Service Bus Java SDK to receive messages from a queue using peek lock.
Within a loop, repeatedly call the getLockedUntil() method for the received message.
Observe that the value returned by getLockedUntil() changes over time.

Expected Behavior:

The getLockedUntil() method should consistently return the same fixed time value for the duration of the peek lock period for a received message. This time value should indicate the point in time until which the message is locked and invisible to other consumers.

Actual Behavior:

In some cases, the time returned by the getLockedUntil() method changes after a certain duration, even though it should remain constant until the peek lock expires.

Additional Information:

  • The inconsistency in the behavior of the getLockedUntil() method can lead to incorrect assumptions about the state of messages in the queue and potentially cause processing issues.
  • The issue seems to be related to the internal logic of the SDK, possibly related to how the peek lock duration is managed.
  • This issue impacts applications relying on accurate peek lock expiration time to determine message processing flow and concurrency.

Environment Details:

Azure Service Bus Java SDK version: 7.14.3
Java version: openjdk 11.0.19
Operating system: Mac OS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant