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

Blocking consumer queue silent offer #349

Open
franz1981 opened this issue May 7, 2021 · 5 comments
Open

Blocking consumer queue silent offer #349

franz1981 opened this issue May 7, 2021 · 5 comments

Comments

@franz1981
Copy link
Collaborator

franz1981 commented May 7, 2021

It would be nice to expose some "silent" version of offers that won't try to awake the consumer (it can both fail fast or just offer the element if not full): it can be beneficial when producers know upfront the offer batch size forcing to awake consumer just with a final "noisy" offer or delegating it to other producers that can sustain it. A "silent" fill can work too.
[OPTIONAL] In addition would be nice to expose some mechanism to awake the consumer without offering anything, to perform thread awaking on a separate thread that can sustain the awaking cost.

@franz1981
Copy link
Collaborator Author

Wdyt @nitsanw ? Do you think is a valid/interesting use case?

@nitsanw
Copy link
Contributor

nitsanw commented May 7, 2021

We are looking at 3 distinct API additions:

  • ‘wakeup’ / ‘await’ which allow notifications
  • ‘sneakyOffer’
  • ‘sneakyFill’

We already have a ‘fill’ that serves as a notification at the end of the batch. I see a conflict here between ‘take’ and ‘wakeup’ that can be confusing.

@franz1981
Copy link
Collaborator Author

I like the "sneaky*" name, nice one!

I see a conflict here between ‘take’ and ‘wakeup’ that can be confusing.

You mean re the words meaning?

@nitsanw
Copy link
Contributor

nitsanw commented May 8, 2021

I mean that it's not clear how to return from take on wakeup. take should never return null, and the thread has not really been interrupted.

@franz1981
Copy link
Collaborator Author

franz1981 commented May 8, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants