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

Remove sync API #1472

Closed
lukebakken opened this issue Jan 13, 2024 · 1 comment
Closed

Remove sync API #1472

lukebakken opened this issue Jan 13, 2024 · 1 comment
Assignees
Milestone

Comments

@lukebakken
Copy link
Contributor

Following the discussion here, version 7 of this client will only have an async API available.

References:

@lukebakken lukebakken added this to the 7.0.0 milestone Jan 13, 2024
@lukebakken lukebakken self-assigned this Jan 13, 2024
lukebakken added a commit that referenced this issue Jan 13, 2024
Fixes #1472

Start by removing synchronous methods to create a new connection.
lukebakken added a commit that referenced this issue Jan 17, 2024
Fixes #1472

* Remove synchronous API methods.
* Update all usages of CreateConnection to use CreateConnectionAsync.
* Ensure that all connections and channels are closed prior to Dispose.
* Use lowest feasible LangVersion for projects.
* Add note about nullable reference types in `RabbitMQ.Client.csproj`.
* Convert `ManualResetEventSlim` and associated classes to `TaskCompletionSource<bool>` or `SemaphoreSlim`.
* Only use ValueTask for operations that need the performance benefit.
* Add async passive declaration convenience methods to the async API.
* Fix missing CloseAsync() statements prior to disposing `IConnection`
  and `IChannel` instances.
* Fix bug where `QueueBindAsync` did not record the binding in an `AutorecoveringChannel`.
* Added `ProcessUtil` to run command line executables via `async`.
* Make `TopologyRecoveryExceptionHandler` async.
* Ensure test classes call `base.DisposeAsync()` appropriately.
* Add `RABBITMQ_LONG_RUNNING_TESTS=true` to `build.ps1`
lukebakken added a commit that referenced this issue Jan 24, 2024
Part of the fix for #1472

* Remove synchronous API methods
* Update all usages of `CreateConnection` to use `CreateConnectionAsync`
* Ensure that all connections and channels are closed prior to `Dispose`
* Use lowest feasible `LangVersion` for projects
* Add note about nullable reference types in `RabbitMQ.Client.csproj`
* Convert `ManualResetEventSlim` and associated classes to `TaskCompletionSource<bool>` or `SemaphoreSlim`
* Only use `ValueTask` for operations that need the performance benefit
* Add async passive declaration convenience methods to the async API
* Fix missing `CloseAsync` statements prior to disposing `IConnection`
  and `IChannel` instances
* Fix bug where `QueueBindAsync` did not record the binding in an `AutorecoveringChannel`
* Added `ProcessUtil` to run command line executables via `async`
* Make `TopologyRecoveryExceptionHandler` async
* Ensure test classes call `base.DisposeAsync()` appropriately
* Add `RABBITMQ_LONG_RUNNING_TESTS=true` to `build.ps1`
* Remove `Close` and `Abort` from `IConnection` and `IConnectionExtensions`
* Remove `Close` and `Abort` from `IChannel` and `IChannelExtensions`
* Remove use of `RecoveryChannelFactory`
* Remove `Close` from `AutorecoveringConnection` and `Connection`
* Ensure `TestConnectionRecoveryWithoutSetup` tests close and dispose of channels correctly
* Remove `ConfirmSelect`
* Remove `ExchangeBind` and `ExchangeBindNoWait`
* Add `noWait` to `ExchangeBindAsync` and `ExchangeDeclareAsync`
* Remove `ExchangeDeclarePassive`
* Fix stack overflow in `ExchangeBindAsync`
* Remove `ExchangeDelete` and `ExchangeDeleteNoWait`
* Remove `BasicGet`
* Remove `BasicNack`
* Change `BasicNackAsync` to return `ValueTask`
* Remove `BasicCancel` and `BasicCancelNoWait`
* Remove `BasicPublish`
* Remove `BasicQos`
* Remove `BasicReject`
* Remove `ExchangeUnbind` and `ExchangeUnbindNoWait`
* Remove `QueueBind`, `QueueBindNoWait`, QueueDeclare`, `QueueDeclareNoWait`, and `QueueDeclarePassive`
* Remove `QueueDelete` and `QueueDeleteNoWait`
* Make `noWait` the last param in the arg list. Default is `false`
* Remove `BasicAck`
* Modify `IBasicConsumer` to make `HandleBasicDeliver` an async method
* Move `passive` to the end of the argument list, just before `noWait`
* Remove `QueuePurge`
* Remove `QueueUnbind`
* Remove `TxSelect`, `TxCommit` and `TxRollback`
* Remove `WaitForConfirms` and `WaitForConfirmsOrDie`
* Remove `BasicConsume`
* Delete code for sync API
lukebakken added a commit that referenced this issue Jan 24, 2024
Part of the fix for #1472

* Remove synchronous API methods
* Update all usages of `CreateConnection` to use `CreateConnectionAsync`
* Ensure that all connections and channels are closed prior to `Dispose`
* Use lowest feasible `LangVersion` for projects
* Add note about nullable reference types in `RabbitMQ.Client.csproj`
* Convert `ManualResetEventSlim` and associated classes to `TaskCompletionSource<bool>` or `SemaphoreSlim`
* Only use `ValueTask` for operations that need the performance benefit
* Add async passive declaration convenience methods to the async API
* Fix missing `CloseAsync` statements prior to disposing `IConnection`
  and `IChannel` instances
* Fix bug where `QueueBindAsync` did not record the binding in an `AutorecoveringChannel`
* Added `ProcessUtil` to run command line executables via `async`
* Make `TopologyRecoveryExceptionHandler` async
* Ensure test classes call `base.DisposeAsync()` appropriately
* Add `RABBITMQ_LONG_RUNNING_TESTS=true` to `build.ps1`
* Remove `Close` and `Abort` from `IConnection` and `IConnectionExtensions`
* Remove `Close` and `Abort` from `IChannel` and `IChannelExtensions`
* Remove use of `RecoveryChannelFactory`
* Remove `Close` from `AutorecoveringConnection` and `Connection`
* Ensure `TestConnectionRecoveryWithoutSetup` tests close and dispose of channels correctly
* Remove `ConfirmSelect`
* Remove `ExchangeBind` and `ExchangeBindNoWait`
* Add `noWait` to `ExchangeBindAsync` and `ExchangeDeclareAsync`
* Remove `ExchangeDeclarePassive`
* Fix stack overflow in `ExchangeBindAsync`
* Remove `ExchangeDelete` and `ExchangeDeleteNoWait`
* Remove `BasicGet`
* Remove `BasicNack`
* Change `BasicNackAsync` to return `ValueTask`
* Remove `BasicCancel` and `BasicCancelNoWait`
* Remove `BasicPublish`
* Remove `BasicQos`
* Remove `BasicReject`
* Remove `ExchangeUnbind` and `ExchangeUnbindNoWait`
* Remove `QueueBind`, `QueueBindNoWait`, QueueDeclare`, `QueueDeclareNoWait`, and `QueueDeclarePassive`
* Remove `QueueDelete` and `QueueDeleteNoWait`
* Make `noWait` the last param in the arg list. Default is `false`
* Remove `BasicAck`
* Modify `IBasicConsumer` to make `HandleBasicDeliver` an async method
* Move `passive` to the end of the argument list, just before `noWait`
* Remove `QueuePurge`
* Remove `QueueUnbind`
* Remove `TxSelect`, `TxCommit` and `TxRollback`
* Remove `WaitForConfirms` and `WaitForConfirmsOrDie`
* Remove `BasicConsume`
* Delete code for sync API
* Make `UpdateSecret` async
lukebakken added a commit that referenced this issue Feb 19, 2024
Part of the fix for #1472

* Remove `Close` from `ChannelBase`
lukebakken added a commit that referenced this issue Feb 19, 2024
Part of the fix for #1472

* Remove `Close` from `ChannelBase`

* Remove unreachable methods in `ChannelBase`

* Remove `_Private_ChannelClose`

* Convert `ConnectionTuneOk` into `ConnectionTuneOkAsync`

* Making `HandleChannleClose` async
lukebakken added a commit that referenced this issue Feb 20, 2024
Part of the fix for #1472

* Remove `Close` from `ChannelBase`

* Remove unreachable methods in `ChannelBase`

* Remove `_Private_ChannelClose`

* Convert `ConnectionTuneOk` into `ConnectionTuneOkAsync`

* Making `HandleChannleClose` async
lukebakken added a commit that referenced this issue Feb 21, 2024
Part of the fix to #1472

* Remove `ISession.Transmit`
* Change `HeartbeatWriteTimerCallback` to be `async` and use `WriteAsync`
lukebakken added a commit that referenced this issue Feb 23, 2024
Part of the fix to #1472

* Remove `ISession.Transmit`
* Change `HeartbeatWriteTimerCallback` to be `async` and use `WriteAsync`

* Make `HeartbeatReadTimerCallback` async

* Ensure toxiproxy is reset at the end of the test run.

* Make frame / command dispatch async

* Make a couple more methods async

* Update Makefile

* Do not release a SemaphoreSlim that is about to be disposed.

* Fix toxiproxy duplicated entity for good, hopefully

* Add two missing `.ConfigureAwait(false)` calls

* Add missing `.ConfigureAwait(false)` call
lukebakken added a commit that referenced this issue Feb 24, 2024
Part of the fix to #1472

* Remove `ISession.Transmit`
* Change `HeartbeatWriteTimerCallback` to be `async` and use `WriteAsync`

* Make `HeartbeatReadTimerCallback` async

* Ensure toxiproxy is reset at the end of the test run.

* Make frame / command dispatch async

* Make a couple more methods async

* Update Makefile

* Do not release a SemaphoreSlim that is about to be disposed.

* Fix toxiproxy duplicated entity for good, hopefully

* Add two missing `.ConfigureAwait(false)` calls

* Add missing `.ConfigureAwait(false)` call
lukebakken added a commit that referenced this issue Feb 26, 2024
Part of #1472

* Remove the last sync I/O method from `IFrameHandler`
lukebakken added a commit that referenced this issue Feb 26, 2024
Part of #1472

* Remove the last sync I/O method from `IFrameHandler`
lukebakken added a commit that referenced this issue Feb 26, 2024
Part of #1472

* Remove the last sync I/O method from `IFrameHandler`

Update action versions to address Node.js warnings

* Remove use of `EnsureCompleted`

* Handle connection start using async/await

* Remove `EnsureCompleted` task extensions.

* Remove `BasicConsumeRpcContinuation`

* Update action versions to address Node.js warnings

* Remove non-async RPC continuation classes

* Remove unused classes

* Address some TODOs

* Set a `TimeoutException` when an async RPC continuation times out
lukebakken added a commit that referenced this issue Feb 27, 2024
Part of #1472

* Remove the last sync I/O method from `IFrameHandler`

Update action versions to address Node.js warnings

* Remove use of `EnsureCompleted`

* Handle connection start using async/await

* Remove `EnsureCompleted` task extensions.

* Remove `BasicConsumeRpcContinuation`

* Update action versions to address Node.js warnings

* Remove non-async RPC continuation classes

* Remove unused classes

* Address some TODOs

* Set a `TimeoutException` when an async RPC continuation times out
lukebakken added a commit that referenced this issue Feb 27, 2024
lukebakken added a commit that referenced this issue Feb 28, 2024
Part of #1472

* Move some overrides to their base class

* Simplify method, add comments

* Try to figure out CI error here - https://github.com/rabbitmq/rabbitmq-dotnet-client/actions/runs/8072267202/job/22053764839
lukebakken added a commit that referenced this issue Feb 28, 2024
Part of #1472

* Move some overrides to their base class

* Simplify method, add comments

* Try to figure out CI error here - https://github.com/rabbitmq/rabbitmq-dotnet-client/actions/runs/8072267202/job/22053764839

* Ensure `_closeReason` is not null

* Remove or address TODOs

* Revert to calling `AbortAsync` in `Dispose` for connections and channels

* Add test showing that `CloseAsync` is not required before `Dispose`
lukebakken added a commit that referenced this issue Feb 28, 2024
Part of #1472

* Move some overrides to their base class

* Simplify method, add comments

* Try to figure out CI error here - https://github.com/rabbitmq/rabbitmq-dotnet-client/actions/runs/8072267202/job/22053764839

* Ensure `_closeReason` is not null

* Remove or address TODOs

* Revert to calling `AbortAsync` in `Dispose` for connections and channels

* Add test showing that `CloseAsync` is not required before `Dispose`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant