[
https://issues.apache.org/jira/browse/KAFKA-1934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14311684#comment-14311684
]
Jay Kreps commented on KAFKA-1934:
----------------------------------
This is a public interface change so we should do a quick KIP and discuss.
I don't think it makes sense to add a shutdownNow() method given the existing
method we have is close(), if anything it would be closeNow(). I would propose
instead adding close(long timeout, TimeUnit unit) where passing in 0 is the
equivalent of immediate shutdown. This is more general and actually I think the
better thing to use since generally you want to give some time for a graceful
shutdown before dropping data.
> Add a shutdownNow() call to new producer
> ----------------------------------------
>
> Key: KAFKA-1934
> URL: https://issues.apache.org/jira/browse/KAFKA-1934
> Project: Kafka
> Issue Type: New Feature
> Reporter: Jiangjie Qin
> Assignee: Jiangjie Qin
>
> We have a use case where user want to stop send any more messages if an error
> occurred on a previous send. Otherwise the message order might be broken. The
> shutdownNow() call will stop the producer right away without draining the
> messages in accumulator.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)