async Task ReceiveTransportHandle.Stop(CancellationToken cancellationToken) { await _transport.Stop("Stop", cancellationToken).ConfigureAwait(false); await _transport._transportObservable.Completed(new ReceiveTransportCompletedEvent(_transport._inputAddress, _transport._tracker.GetDeliveryMetrics())).ConfigureAwait(false); }
async Task ReceiveTransportHandle.Stop(CancellationToken cancellationToken) { await _transport.Stop("Stop", cancellationToken).ConfigureAwait(false); var completed = new ReceiveTransportCompletedEvent(_transport._inputAddress, _transport._tracker.GetDeliveryMetrics()); await _transport._receiveEndpointContext.TransportObservers.Completed(completed).ConfigureAwait(false); }
async Task ReceiveTransportHandle.Stop(CancellationToken cancellationToken) { LogContext.SetCurrentIfNull(_transport._context.LogContext); await _transport.Stop("Stop", cancellationToken).ConfigureAwait(false); _consumerHandle.Disconnect(); var completed = new ReceiveTransportCompletedEvent(_transport._inputAddress, _transport._dispatcher.GetDeliveryMetrics()); await _transport._context.TransportObservers.Completed(completed).ConfigureAwait(false); }
async Task ReceiveTransportHandle.Stop(CancellationToken cancellationToken) { LogContext.SetCurrentIfNull(_transport._context.LogContext); await _transport.Stop("Stop", cancellationToken).ConfigureAwait(false); _consumerHandle.Disconnect(); var metrics = _transport._dispatcher.GetMetrics(); var completed = new ReceiveTransportCompletedEvent(_transport._inputAddress, metrics); await _transport._context.TransportObservers.Completed(completed).ConfigureAwait(false); LogContext.Debug?.Log("Consumer completed {InputAddress}: {DeliveryCount} received, {ConcurrentDeliveryCount} concurrent", _transport._inputAddress, metrics.DeliveryCount, metrics.ConcurrentDeliveryCount); }