Kafka messaging semantic and consistency

A messaging semantics: three, at least once, at most once, exactly once

1, at lest once: the message is not lost, but may be repeated

2, at most once: the message will be lost, but will not be repeated

3, Exactly Once: the message is not lost, nor repeated.

Second, to ensure data consistency: guaranteed message is not lost, the message will not be repeated

The message is not lost: a copy mechanism + ack, you can ensure that messages are not lost.

Data repeat: brocker saved messages after, before sending the ack is down, producer believes the message is not sent successfully retried, resulting in duplication of data.

Scrambled data: before sending a message fails, the message is sent successfully, and before a retry is successful, resulting in scrambled data.

Third, to ensure the consistency of the message: The main is to ensure Exactly Once, namely: data is not lost, the data is not repeated

1,0.11 kafka previous version:

(1)

 

 

 

 

Reference blog: http://bigdata-star.com/archives/1507

Guess you like

Origin www.cnblogs.com/guoyu1/p/12023092.html