Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Service Bus message auto-renewal timeout #32

Open
cgwrench opened this issue Apr 9, 2019 · 0 comments
Open

Service Bus message auto-renewal timeout #32

cgwrench opened this issue Apr 9, 2019 · 0 comments

Comments

@cgwrench
Copy link
Contributor

cgwrench commented Apr 9, 2019

Messages are received from Service Bus using the PeekLock receive mode. In this mode, when a message is received, it is locked for a period of time. Once that lock expires, the message is available to be delivered again, unless the message is completed before the lock expires.

When registering a message handler, the Service Bus SDK, by default, implements a mechanism to auto-renew message locks. This allows a message handler to continue to process a message for longer than the message lock duration configured on a queue. However, this mechanism has a default timeout of 5 minutes. This means that after 5 minutes, message locks stop being automatically renewed. If the message processor attempts to complete a message after this timeout, it will likely receive an exception indicating that the lock has been lost.

Other queue implementations don't behave in this way, and messages don't automatically become available to be delivered again unless they are explicitly acknowledged, or if the connection to the message broker is lost.

For consistency between the various abstractions, we should override the Service Bus auto-renew timeout. Ideally, we'd set this to be as large a value as is supported.

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

No branches or pull requests

1 participant