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 receiveBatch #2832

Closed
ramya-rao-a opened this issue May 12, 2019 · 2 comments
Closed
Labels
Client This issue points to a problem in the data-plane of the library. Event Hubs
Milestone

Comments

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented May 12, 2019

Using retries for the creation of receiver link is covered in #2835

@ramya-rao-a ramya-rao-a added Client This issue points to a problem in the data-plane of the library. Event Hubs labels May 12, 2019
@ramya-rao-a ramya-rao-a added this to the Sprint 153 milestone May 12, 2019
@ramya-rao-a
Copy link
Contributor Author

Thoughts after offline discussions:

Current state:

  • In case of errors on the AMQP receiver link or AMQP receiver session, receiveBatch returns rejected promise with the error. Subsequent calls to receiveBatch will create new receiver link and receive messages
  • In case of connection errors, the receiveBatch operation times out and the returned promise resolves to the events that were collected till that point. Subsequent calls to recieveBatch will fail until the network is back

Proposal to add retry options to receiveBatch() such that

  • In the first case above, we can create new receiver link without bothering the user in case of retryable errors.
    • Downside: The user might have time sensitive application and added a modest maxTimeWait option for receiveBatch operation. Us retrying behind the scenes will only hold up the operation that the user is awaiting on. Maybe, dont retry by default unless user specifies retry options? Or have such users provide options so as to not retry at all.
  • For the second case, the initial link creation can use the retry policy provided here.

Implementation option:

  • Use the RetryConfig directly in the receiveBatch with the operation being bReceiver.receive
  • detached() is not called for batching receiver

@ramya-rao-a
Copy link
Contributor Author

As per the API proposal in #2718 (comment), we will now have a createReceiver() method on the Event Hub Client that returns a receiver. It is on this method that we will be allowing retry options rather than individual operations.

Therefore, closing this issue in favor of #3184

@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Event Hubs
Projects
None yet
Development

No branches or pull requests

1 participant