logback-kafka-appender icon indicating copy to clipboard operation
logback-kafka-appender copied to clipboard

Do we lose logs if the brokers aren't available?

Open javadevmtl opened this issue 4 years ago • 1 comments

Just curious, if the brokers aren't available, do we eventually lose logs with this solution? For example using a log tailer like Filebeat or Fluent.D thos mecanism will keep track their place and retry as needed.

javadevmtl avatar Feb 17 '20 21:02 javadevmtl

There is no automatism that would retain and retransmit logs that could not be delivered directly. You MAY use a fallback-appender (ref to readme) that would send log messages somewhere else where they might be stored and retransmitted later. Example: My original use case was to append logs from read-only containers to kafka. So as long as Kafka was available, the container would publish it's logs to kafka. If there was an broker outage, it's log messages would be sent to the fallback-appender. The fallback appender in this case would be a console.err appender that would be picked up by the docker logging driver and act as a fallback.

danielwegener avatar Feb 17 '20 22:02 danielwegener