I'm trying to use MockConsumer to test my application code but I've faced a
couple of limitations and I want to know if there are workarounds or
something that I'm overlooking.
Note: I'm using kafka-clients v

   1. Why the addRecord
   requires that the consumer has assigned partitions? Given that this is just
   simulating records being produced or existing records.
   2. Why the poll
   clear the map of records? It should not be cleared after commit?
   3. Why the commitAsync
   doesn't check for an exception and always succeed?

Due to items (2) and (3) I'm not be able to test scenarios where the
commits fails and the consumer should poll again the same elements.

If someone knows about other scenarios that can't be tested with
MockConsumer, please let me know.


Reply via email to