The high-level user API seems to read one message at a time.
This can be quite problematic for consumers if they want to process and send these messages to other downstream users, such as Solr or Elastic-Search, because they prefer to have messages in bulk rather than one at a time.
It is not easy to unload these messages into memory, because, in addition to the fact that offsets in Kafka should also be synchronized only when the packet is already executed, otherwise a broken kafka consumer with uncommitted downstream messages (as in Solr or ES) will its offsets and, therefore, free messages have already been updated.
A consumer may consume messages more than once if it fails after sending messages downstream, but before updating message offsets.
If Kafka spends messages in batch mode, then some pointers to code / documentation will be greatly appreciated.
Thanks!
source share