Martin Grotzke created KAFKA-5343: ------------------------------------- Summary: MockProducer should not handle send/ProducerRecord after close Key: KAFKA-5343 URL: https://issues.apache.org/jira/browse/KAFKA-5343 Project: Kafka Issue Type: Improvement Components: producer Affects Versions: 0.10.2.1 Reporter: Martin Grotzke Priority: Minor
Currently {{MockProducer}} implements {{close}} with void, i.e. it just does nothing on {{close}}. Assuming production code built for "max.in.flight.requests.per.connection=1" with transforms a list of events/records to several invocations of {{send(record, callback)}}, where the {{callback}} invokes {{close(0, MILLISECONDS)}} in case of an exception, the expectation is that after {{send}} failed for record R1, any record that was sent after R1 is *not* handled. Similarly, in case of the {{MockProducer}}, the expectation is that any record after R1 is just ignored, and specifically neither autocompleted nor added to the list of completions. This is not the case, because the {{MockProducer}} just ignores an invocation of {{close}}. This fix should be trivial, does it makes sense to submit a PR for this? -- This message was sent by Atlassian JIRA (v6.3.15#6346)