Skip to content

Track2: Evaluate if receive() with max_batch_size should be more flexible #10934

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

Closed
KieranBrantnerMagee opened this issue Apr 20, 2020 · 2 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Service Bus
Milestone

Comments

@KieranBrantnerMagee
Copy link
Member

Is your feature request related to a problem? Please describe.
Currently if you just call receive() with max_batch_size > 1 on a new receiver, you'll get an error about link credit. This is because prefetch defaults to 1, so you can't batch greater than that. While we intend to improve the error, it begs the question of if receive() might be improved with different behavior.

Describe the solution you'd like
Receive should give a more intuitive semantic to a user with no prior knowledge/expectations, at the very least giving actionable guidance to address the failure.

Describe alternatives you've considered
A few options off the cuff, but I don't feel strongly about any of these yet, will be contemplating in the interim:

  1. receive() does a polling loop if max_batch_size > prefetch, either up until idle_timeout, or max_batch_size.
  2. receive() simply returns max(prefetch, max_batch_size) events; it is MAX batch size after all.
  3. Do nothing other than improving the error
@KieranBrantnerMagee KieranBrantnerMagee added Service Bus Client This issue points to a problem in the data-plane of the library. labels Apr 20, 2020
@KieranBrantnerMagee KieranBrantnerMagee added this to the [2020] June milestone Apr 20, 2020
@KieranBrantnerMagee KieranBrantnerMagee self-assigned this Apr 20, 2020
@KieranBrantnerMagee
Copy link
Member Author

This has been included in the questions to evaluate as part of python UX studies. Bringing milestone forward to July, as those studies will be performed in the next 2-3 weeks.

@yunhaoling
Copy link
Contributor

.Net has the concept of prefetch as well but looks like they have a different strategy when receiving messages. Need to sync with Josh on this.

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. Service Bus
Projects
None yet
Development

No branches or pull requests

2 participants