H13-723_V2.0 · Question #31
In Kafka, the Producer can ensure that the data is sent in order by configuring the synchronization parameters (producer.type).
The correct answer is A. True. Option A is correct because the producer.type parameter controls whether the Kafka producer operates in synchronous (sync) or asynchronous (async) mode. When set to sync, the producer blocks and waits for an acknowledgment before sending the next message, ensuring records are…
Question
In Kafka, the Producer can ensure that the data is sent in order by configuring the synchronization parameters (producer.type).
Options
- ATrue
- BFalse
How the community answered
(31 responses)- A74% (23)
- B26% (8)
Explanation
Option A is correct because the producer.type parameter controls whether the Kafka producer operates in synchronous (sync) or asynchronous (async) mode. When set to sync, the producer blocks and waits for an acknowledgment before sending the next message, ensuring records are delivered to the broker sequentially and in order within a partition.
Option B (False) is wrong because ordering can be guaranteed - it simply requires the right producer configuration. Asynchronous mode (async) can break ordering if retries or batching reorder messages in flight, but sync mode eliminates that risk by serializing sends.
Note:
producer.typeis a legacy (pre-0.11) Kafka config. Modern Kafka achieves guaranteed ordering viamax.in.flight.requests.per.connection=1(and optionallyenable.idempotence=true), but the principle is the same.
Memory tip: Think "sync = sequential = safe order" - synchronous production is like mailing letters one at a time and waiting for delivery confirmation before writing the next one; async is like dropping a stack in a mailbox and hoping they arrive in order.
Topics
Community Discussion
No community discussion yet for this question.