Issue Description:
After receiving a message from an Azure Service Bus Queue using the Java SDK, I 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.
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
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.