Skip to content

Async flow control#1681

Merged
lukebakken merged 11 commits intorabbitmq:mainfrom
danielmarbach:reset-event
Sep 18, 2024
Merged

Async flow control#1681
lukebakken merged 11 commits intorabbitmq:mainfrom
danielmarbach:reset-event

Conversation

@danielmarbach
Copy link
Collaborator

@danielmarbach danielmarbach commented Sep 18, 2024

Proposed Changes

Addresses #1644

Types of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating
the PR. If you're unsure about any of them, don't hesitate to ask on the
mailing list. We're here to help! This is simply a reminder of what we are
going to look for before merging your code.

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • All tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in related repositories

Further Comments

If this is a relatively large or complex change, kick off the discussion by
explaining why you chose the solution you did and what alternatives you
considered, etc.

@danielmarbach danielmarbach changed the title Reset event Async flow control Sep 18, 2024
@danielmarbach
Copy link
Collaborator Author

@stebet @bollhals @paulomorgado would appreciate a look since this is some non trivial magic.

lukebakken
lukebakken previously approved these changes Sep 18, 2024
Copy link
Collaborator

@lukebakken lukebakken left a comment

Choose a reason for hiding this comment

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

Thank you @danielmarbach

@lukebakken
Copy link
Collaborator

Should we worry about the scenario where flow control is active and a publisher just keeps on going? I'm assuming this will "pile up" tasks/continuations/"under the hood magic" behind the scenes. Should there be a limit to the number of publishes that can happen while blocked by flow control?

@danielmarbach
Copy link
Collaborator Author

Should we worry about the scenario where flow control is active and a publisher just keeps on going? I'm assuming this will "pile up" tasks/continuations/"under the hood magic" behind the scenes. Should there be a limit to the number of publishes that can happen while blocked by flow control?

Assuming this is actually a problem that requires to be solved isn't this already an issue before this change?

@danielmarbach
Copy link
Collaborator Author

With these changes in we will have also the door open to implement IAsyncDisposable across both TFMs.

@lukebakken
Copy link
Collaborator

Assuming this is actually a problem that requires to be solved isn't this already an issue before this change?

Ah, ok, this will only be a problem if someone is not immediately await-ing the BasicPublishAsync result, and batching them up. I guess it's on the user in that case 😉

@danielmarbach
Copy link
Collaborator Author

Having here in the PR is more then enough especially considering the implementation I provided is significantly different due to modernizations applied

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

Labels

None yet

5 participants