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

Persistent stream pulling agent now uses exponential backoff #2078

Merged
merged 1 commit into from
Aug 19, 2016

Conversation

jason-bragg
Copy link
Contributor

Persistent stream pulling agent now uses exponential backoff when encountering errors when reading from queues.
This prevents agents from spamming backend queue services that are encountering transient errors.
If no data is read, usual retry timer is applied. Exponential backoff is only triggered when errors occur.

{
var now = DateTime.UtcNow;
// Try to cleanup the pubsub cache at the cadence of 10 times in the configurable StreamInactivityPeriod.
if ((now - lastTimeCleanedPubSubCache) >= config.StreamInactivityPeriod.Divide(StreamInactivityCheckFrequency))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the cache cleanup code logically does not belong inside the func, but rather outside the loop, or even better in a separate timer. you can improve it later on.

@gabikliot
Copy link
Contributor

LGTM.

@gabikliot gabikliot merged commit 31de21e into dotnet:master Aug 19, 2016
@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants