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

[Event Hubs] Allow users to configure retry options in send requests #2997

Merged
merged 10 commits into from
May 20, 2019

Conversation

ShivangiReja
Copy link
Member

Allow users to configure retry options in send requests as described in #2661 (comment) for send operations on EventHubClient.

@ShivangiReja ShivangiReja added Client This issue points to a problem in the data-plane of the library. Event Hubs labels May 18, 2019
@ShivangiReja ShivangiReja requested a review from ramya-rao-a May 18, 2019 01:05
@ShivangiReja ShivangiReja self-assigned this May 18, 2019
@@ -581,8 +585,11 @@ export class EventHubSender extends LinkEntity {
operation: sendEventPromise,
connectionId: this._context.connectionId,
operationType: RetryOperationType.sendMessage,
times: Constants.defaultRetryAttempts,
delayInSeconds: Constants.defaultDelayBetweenOperationRetriesInSeconds + jitterInSeconds
times: options && options.retryAttempts ? options.retryAttempts : Constants.defaultRetryAttempts,
Copy link
Contributor

Choose a reason for hiding this comment

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

options && options.retryAttempts is "falsy", if the provided value was 0.
Use the user provided value only if it is greater than 0.
Check with @bterlson if we want retryAttempts as exposed to the user to mean the total number of attempts or the number of attempts after the first failure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. Event Hubs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants