Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

This page is meant as a template for writing a KIP. To create a KIP choose Tools->Copy on this page and modify with your content and replace the heading with the next KIP number and a description of your issue. Replace anything in italics with your own description.

Status

Current state: Under Discussion Accepted

Discussion thread: here [Change the link from the KIP proposal email archive to your own email thread] 

Vote thread: here 

JIRA:

Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyKAFKA-10790

...

If the `Producer` detects that the `flush` method is invoked within the callback of the `close` method, throw a `KafkaException`.

This approach would require modifying org.apache.kafka.clients.producer.Producer#flush  to include KafkaException .

...

If the `Producer` detects that the `flush` method is invoked within the callback of the `close` method, log an error message.

Reason for Rejection

Although adding an error log message could help users understand what happened, it does not provide sufficient protection.

...