Re: Testing with MockConsumer

2018-02-19 Thread Ted Yu
For #3, a better example would be in ConsumerCoordinator (around line 632). commitOffsetsAsync(allConsumedOffsets, new OffsetCommitCallback() { @Override public void onComplete(Map offsets, Exception exception) { FYI On Mon, Feb

Re: Testing with MockConsumer

2018-02-19 Thread Gabriel Giussi
Hi Ted, my mistake was believe that commited offsets are used on the next poll, but is not the case . > The offsets committed using this

Re: Testing with MockConsumer

2018-02-19 Thread Ted Yu
For #2, I think the assumption is that the records are processed by the loop: https://github.com/apache/kafka/blob/73be1e1168f91ee2a9d68e1d1c75c14018cf7d3a/clients/src/main/java/org/apache/kafka/clients/consumer/MockConsumer.java#L164 On Mon, Feb 19, 2018 at 4:39 AM, Gabriel Giussi