public async Task Faulted(Exception exception) { try { await _lockContext.Abandon(exception).ConfigureAwait(false); } catch (Exception ex) { LogContext.Warning?.Log(exception, "Abandon message faulted: {MessageId} - {Exception}", _message.MessageId, ex); } }
public async Task Faulted(Exception exception) { if (exception is MessageLockExpiredException) { return; } if (exception is MessageTimeToLiveExpiredException) { return; } try { await _lockContext.Abandon(exception).ConfigureAwait(false); } catch (Exception ex) { LogContext.Warning?.Log(exception, "Abandon message faulted: {MessageId} - {Exception}", _message.MessageId, ex); } }