Skip to content

[event-hubs] add downtime recovery sample#15152

Closed
chradek wants to merge 1 commit intoAzure:mainfrom
chradek:eh-downtime-sample
Closed

[event-hubs] add downtime recovery sample#15152
chradek wants to merge 1 commit intoAzure:mainfrom
chradek:eh-downtime-sample

Conversation

@chradek
Copy link
Contributor

@chradek chradek commented May 6, 2021

/cc @ramya-rao-a

This is a rough sample of how a user could keep track of MessagingErrors and decide to recreate their EventHubConsumerClient.

The DowntimeTracker is super simple. It just keeps track of the timestamps when isDown() is called. It also accepts a "maximumAllowedDowntimeInSeconds" parameter in the constructor that basically sets the threshold where if we see errors for longer than this period, we consider the client 'down'.

For this to work properly, the user also needs to call downtimeTracker.clear() when they do receive an event to indicate that the downtime ended.

It needs some disclaimers and I wasn't sure where exactly is the best place to put it but for now added it as a sample.

@ghost ghost added the Event Hubs label May 6, 2021
@chradek chradek changed the title [WIP][event-hubs] add downtime recovery sample [event-hubs] add downtime recovery sample May 13, 2021
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-js that referenced this pull request Jul 28, 2021
@ghost ghost added the no-recent-activity There has been no recent activity on this issue. label Feb 25, 2022
@ghost
Copy link

ghost commented Feb 25, 2022

Hi @chradek. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.

@ghost ghost closed this Mar 4, 2022
@ghost
Copy link

ghost commented Mar 4, 2022

Hi @chradek. Thank you for your contribution. Since there hasn't been recent engagement, we're going to close this out. Feel free to respond with a comment containing "/reopen" if you'd like to continue working on these changes. Please be sure to use the command to reopen or remove the "no-recent-activity" label; otherwise, this is likely to be closed again with the next cleanup pass.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Event Hubs no-recent-activity There has been no recent activity on this issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant