APISonar


pl.allegro.tech.hermes.frontend.publishing.handlers.end.MessageErrorProcessor.log

> pl > allegro > tech > hermes > frontend > publishing > handlers > end > MessageErrorProcessor > log
pl APIs allegro APIs tech APIs hermes APIs frontend APIs publishing APIs handlers APIs end APIs MessageErrorProcessor APIs log APIs

Example 1
private final MessageErrorProcessor messageErrorProcessor;

    private Receiver.ErrorCallback readingError(MessageState state, StartedTimersPair readingTimers, AttachmentContent attachment) {
        return (exchange, exception) -> {
            if (state.setReadingError()) {
                readingTimers.close();
                attachment.removeTimeout();
                messageErrorProcessor.sendAndLog(exchange, attachment.getTopic(), attachment.getMessageId(),
                        error("Error while reading message. " + getRootCauseMessage(exception), INTERNAL_ERROR), exception);
            } else {
                messageErrorProcessor.log(
                        exchange,
                        "Error while reading message after timeout execution. " + getRootCauseMessage(exception),
                        exception);
            }
        };
    }