rabbitmq-dotnet-client icon indicating copy to clipboard operation
rabbitmq-dotnet-client copied to clipboard

Implement full async channel

Open bollhals opened this issue 4 years ago • 7 comments

Proposed Changes

Implements the proposal (#970) except the wait for confirmation part (will be done later to keep this PR "smaller") and some smaller modification / renamings along the way.

Types of Changes

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

Checklist

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

Further Comments

  • I've added xml documentation to all public API's
  • I've made the Channel classes as well as the interface public. The interface is returned in methods but it can be casted if users want to be able to.
  • I've extracted all channel 0 specific methods into the ConnectionChannel class, so the actual Channel is less crowded.
  • The implementation itself isn't fully async yet, but this is more about the API itself, so we can modify the things below next.

Open questions

  • Where should these types be saved in the source? (Current stored in "client/impl/channel")
  • What namespace should these types have?

bollhals avatar Dec 05 '20 14:12 bollhals

Mind taking a look at this? @stebet @bording @michaelklishin (You were commenting on #970 )

bollhals avatar Dec 05 '20 22:12 bollhals

I can't yet request formal reviews, but I would like to start having a discussion about these changes as they should mark the direction of 8.0. @michaelklishin @stebet @danielmarbach @lukebakken

bollhals avatar Dec 10 '20 21:12 bollhals

I can't yet request formal reviews, but I would like to start having a discussion about these changes as they should mark the direction of 8.0. @michaelklishin @stebet @danielmarbach @lukebakken

I'll take a look at this tomorrow :)

stebet avatar Dec 10 '20 22:12 stebet

Sorry wasn't able to finish the whole thing. I have limited time at my hands before christmas. Here are a few thoughts

Well it's a big change and any feedback is very much appreciated!

Regarding the questions about async in Consumer / Connection, as the PR was already quite huge, so I've tried to limit changes outside of the IModel/IChannel for a future PR. I think it's simple to do changes to full async all the way stepwise. But yes all of it should be modified!

bollhals avatar Dec 17 '20 21:12 bollhals

Sorry to drag you into resolving some non-trivial conflicts @bollhals. We decided to go ahead and merge https://github.com/rabbitmq/rabbitmq-dotnet-client/pull/1202 as it felt like the right thing to do since we require net6.0 now for 7.0. This obviously affects all pull requests in flight.

michaelklishin avatar May 08 '22 16:05 michaelklishin

I will hopefully be able to bring this PR up-to-date once #1199 is merged.

lukebakken avatar May 13 '22 14:05 lukebakken

I reverted #1202 because it makes back and forward-porting impossible unless all maintained branches adopt file-scoped namespaces.

michaelklishin avatar May 15 '22 12:05 michaelklishin

@bollhals now that I've merged #1264 would you like to rebase this on main? I can give it a try as well.

lukebakken avatar Mar 01 '23 22:03 lukebakken

I'm swamped with other stuff right now, so I do not have a lot of time to invest in this. So if you/someone can take over, that would be great.

bollhals avatar Mar 01 '23 23:03 bollhals

~~Would it make sense to make several small PRs, starting simply with ConnectAsync and then gradually going through the operations?~~

I'll take a quick look to see how much work this is to merge and go through before suggesting we take an approach like splitting it up into smaller PRs

stebet avatar Mar 02 '23 12:03 stebet

Thanks @stebet

lukebakken avatar Mar 02 '23 17:03 lukebakken

@stebet I'm starting on porting these changes to main, beginning with the IModel -> IChannel and related renames.

lukebakken avatar Mar 10 '23 14:03 lukebakken