public OnCallbackException ( RabbitMQ.Client.Events.CallbackExceptionEventArgs args ) : void | ||
args | RabbitMQ.Client.Events.CallbackExceptionEventArgs | |
Résultat | void |
protected override async Task Execute(ModelBase model, IAsyncBasicConsumer consumer) { try { await consumer.HandleBasicDeliver(_consumerTag, _deliveryTag, _redelivered, _exchange, _routingKey, _basicProperties, _body.Memory.Slice(0, _bodyLength)).ConfigureAwait(false); } catch (Exception e) { var details = new Dictionary <string, object>() { { "consumer", consumer }, { "context", "HandleBasicDeliver" } }; model.OnCallbackException(CallbackExceptionEventArgs.Build(e, details)); } finally { _body.Dispose(); } }
protected override async Task Execute(ModelBase model, IAsyncBasicConsumer consumer) { try { await consumer.HandleBasicDeliver(_consumerTag, _deliveryTag, _redelivered, _exchange, _routingKey, _basicProperties, _body).ConfigureAwait(false); } catch (Exception e) { var details = new Dictionary <string, object>() { { "consumer", consumer }, { "context", "HandleBasicDeliver" } }; model.OnCallbackException(CallbackExceptionEventArgs.Build(e, details)); } finally { if (MemoryMarshal.TryGetArray(_body, out ArraySegment <byte> segment)) { ArrayPool <byte> .Shared.Return(segment.Array); } } }
public void HandleBasicConsumeOk(IBasicConsumer consumer, string consumerTag) { UnlessShuttingDown(() => { try { consumer.HandleBasicConsumeOk(consumerTag); } catch (Exception e) { var details = new Dictionary <string, object>() { { "consumer", consumer }, { "context", "HandleBasicConsumeOk" } }; model.OnCallbackException(CallbackExceptionEventArgs.Build(e, details)); } }); }
protected override async Task Execute(ModelBase model, IBasicConsumer consumer) { try { await consumer.HandleModelShutdown(model, reason).ConfigureAwait(false); } catch (Exception e) { var details = new Dictionary <string, object>() { { "consumer", consumer }, { "context", "HandleModelShutdown" } }; await model.OnCallbackException(CallbackExceptionEventArgs.Build(e, details)); } }
protected override async Task Execute(ModelBase model, IAsyncBasicConsumer consumer) { try { await consumer.HandleBasicCancelOk(_consumerTag).ConfigureAwait(false); } catch (Exception e) { var details = new Dictionary <string, object>() { { "consumer", consumer }, { "context", "HandleBasicCancelOk" } }; model.OnCallbackException(CallbackExceptionEventArgs.Build(e, details)); } }
protected override async Task Execute(ModelBase model, IAsyncBasicConsumer consumer) { try { await consumer.HandleBasicDeliver(consumerTag, deliveryTag, redelivered, exchange, routingKey, basicProperties, body).ConfigureAwait(false); } catch (Exception e) { var details = new Dictionary <string, object>() { { "consumer", consumer }, { "context", "HandleBasicDeliver" } }; model.OnCallbackException(CallbackExceptionEventArgs.Build(e, details)); } }