Is there a way to atomically batch produce in kafka? -


i have source batch of messages. these messages need added kafka - reliably - no misses , no out of order.

if use aync producer, when put many messages, wonder if partition down time, skip message , put next message - result in out of order message.

is there way, can tell kafka - batch produce set of messages , either atomically pass of fail ?

*i don't want sync produce, severely impact throughput.

you can use message key this. kafka guarantees order of messages in single partition, not across multiple partitions. messages single key passed single partition - order preserved. when sent batch, shall pass or fail together. there trade of: these messages handled single machine - no parallelism.

more background info on keys , partitions in official kafka documentation here: http://kafka.apache.org/documentation.html#intro_producers
http://kafka.apache.org/documentation.html#intro_consumers


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -