kafka-配置-request.required.acks

0,

This value controls when a produce request is considered completed. Specifically, how many other brokers must have committed the data to their log and acknowledged this to the leader? Typical values are
0 , which means that the producer never waits for an acknowledgement from the broker (the same behavior as 0.7). This option provides the lowest latency but the weakest durability guarantees (some data will be lost when a server fails).

【0:producer push出消息之后,永遠(yuǎn)不會(huì)等待broker的ack】

1,

which means that the producer gets an acknowledgement after the leader replica has received the data. This option provides better durability as the client waits until the server acknowledges the request as successful (only messages that were written to the now-dead leader but not yet replicated will be lost).

【leader replica收到數(shù)據(jù)后,producer會(huì)得到一個(gè)ack;提供了更好的持久性,因?yàn)閏lienet能等到server收到ack;如果消息剛剛寫到leader上,還沒(méi)來(lái)得及復(fù)制leader就掛啦,那么消息就會(huì)丟失了?!?/p>

-1,

which means that the producer gets an acknowledgement after all in-sync replicas have received the data. This option provides the best durability, we guarantee that no messages will be lost as long as at least one in sync replica remains.
【所有在列的ISR in-sync-replica 都收到數(shù)據(jù)后才給producer一個(gè)ack】

http://www.tuicool.com/articles/aM32quv

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • A topic typically has multiple partitions, there is no gu...
    AlstonWilliams閱讀 792評(píng)論 0 1
  • =========================================================...
    _燈火闌珊處閱讀 2,544評(píng)論 0 3
  • 一天學(xué)一句 《弟子規(guī)》-59 原文:若衣服,若飲食;不如人,勿生戚。 注解:至于外表穿著或者飲食方...
    無(wú)名_a1f6閱讀 492評(píng)論 0 2
  • 今天早上寶寶為我準(zhǔn)備了一杯姜棗茶。有一片烤熱的面包,還有一杯牛奶。寶寶每天早上都會(huì)陪我去上班,讓我覺得特別溫暖。我...
    噯寧閱讀 2,261評(píng)論 0 0
  • 時(shí)光匆匆,歲月總是無(wú)情的帶走我們的青春。它可以剝奪我們青春的時(shí)間卻剝奪不了我們青春的思想,抓住每一次機(jī)會(huì),珍...
    楊平的閱讀 465評(píng)論 1 0

友情鏈接更多精彩內(nèi)容