Kafka 同步生产者

Kafka Synchronous Producer

我遇到了以下关于生产者同步发送的问题。我知道上下文生产者中的异步机制

Invoking get() on this future will block until the associated request completes and then return the metadata for the record or throw any exception that occurred while sending the record.

相关请求完成的真正含义,我很清楚这不是指完成请求,而是指什么这个短语指的是什么程度?直到经纪人?直到缓冲区在生产者等中使用.. ?

ack = all 与同步生产者和异步生产者一起使用时有何不同?两种情况都被阻止确认?

生产者有一个内部队列来缓冲一些记录(基于配置linger.msmin.batch.size)。有一个内部后台线程请求broker(leader分区所在的)发送批处理数据。根据配置 max.connections.in.flight,生产者可以并行处理多个请求。这是“关联请求”的意思。

How it is different when ack = all is used along with synchronous producer and async producer ? Both scenarios are blocked for acknowledgment ?

get 方法将阻塞,直到对代理的请求完成,这意味着它收到了所有基于 acks 设置的确认。

使用 get 方法总是会导致同步生产者。