data ingestion atomicity with respect to kafka

Say i have to ingest 2 rows.
I pass them to kafka using the Producer.send(List) method as a List containing 2 items.

Am i guaranteed that if realtime node can read from kafka, it will read the 2 rows at a time?

Or is it possible that due to failures, only 1 row was read?

What i am looking for is atomicity.

Either druid reads the whole 2 rows or skips over both of them.

Does using the Producer.send(List) method allow atomicity in this case with respect to the list passed?

Kafka does not guarantee atomicity in that situation. If those two rows are meant to roll up together, you could work around that by doing the rollup manually at the producer side and sending the single combined row instead of two separate rows. But if they’re not meant to roll up together, the ingestion won’t be atomic.