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

Allows creation a Multi with an emitter and a buffer size #395

Closed
cescoffier opened this issue Dec 15, 2020 · 2 comments · Fixed by #485
Closed

Allows creation a Multi with an emitter and a buffer size #395

cescoffier opened this issue Dec 15, 2020 · 2 comments · Fixed by #485
Labels
enhancement New feature or request
Milestone

Comments

@cescoffier
Copy link
Contributor

cescoffier commented Dec 15, 2020

At the moment, you can create a Multi from an emitter but you can only configure the back pressure strategy. When using "buffer", it uses the default buffer size. We should allow configuring the buffer size.

Now, the question is what happens if the buffer reaches its full capacity:

  1. should the sender be informed (throwing an exception) - the event is dropped
  2. should the downstream be informed, and so no more event would be received
  3. all the above
@cescoffier cescoffier added this to the 0.15.0 milestone Feb 17, 2021
@cescoffier
Copy link
Contributor Author

Going with (1) as with it, the producer can decide what needs to be done (send a failure, completion, wait until there is more requests).

@cescoffier cescoffier self-assigned this Feb 23, 2021
@jponge jponge added the enhancement New feature or request label Feb 23, 2021
@cescoffier
Copy link
Contributor Author

Actually, the async and serialized nature of the emitter does not allow throwing an exception, as it may be thrown from another thread. So, going with 2).

Fortunately, for 1) the caller can check if the amount of request is greater than 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants