For the following architecture we suppose that you are using the acks=all
property.
Note: even if you did explicitly set acks=all
or set something different thanall
if you are using EOS, idempotency or Transaction, the producer will set it to all
in the background.
Note: when choosing anything different than acks=all
you are guaranteed to lose messages regardless of the failure.
Note: when using more brokers than the replication factor, you have less possibility of data loss but you are less available when using quorum min.insync.replicas
as partitions are scattered around brokers.
Please set the replication factor and min.insync.replicas
adequately.