You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cancellation token would be passed to the subscribing methods that could declare an additional parameter of type CancellationToken.
public Task OnMessageReceived(MyCommand command, CancellationToken cancellationToken) { ... }
The mechanism could be used by the consumer as well, to signal the subscribers that the broker is disconnecting (maybe because the application is exiting) and the pending operations should be aborted.
Task IPublisher.PublishAsync(object, CancellationToken)
The cancellation token would be passed to the subscribing methods that could declare an additional parameter of type
CancellationToken
.public Task OnMessageReceived(MyCommand command, CancellationToken cancellationToken) { ... }
The mechanism could be used by the consumer as well, to signal the subscribers that the broker is disconnecting (maybe because the application is exiting) and the pending operations should be aborted.
(Thank you @mjeanrichard for the input.)
The text was updated successfully, but these errors were encountered: