GitHub user xvrl opened a pull request:
https://github.com/apache/kafka/pull/4308
MINOR: make addWaiter public and fix exception handling
KafkaFuture.thenApply(...) only allows invoking a callback on normal
completion.
Making KafkaFuture.addWaiter(...) public makes possible to invoke a
callback on exceptional completion as well.
Exceptions thrown by waiters could have prevented other waiters from
executing, possibly breaking KafkaFuture.allOf(), so it seemed advisable
to wrap waiters to catch and log exceptions before making this API public.
cc @cmccabe @ijuma
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/xvrl/kafka make-add-waiter-public
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/4308.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #4308
----
commit 40908e15e75ba0ed15a27904e06e17ebce7f44e6
Author: Xavier Léauté <[email protected]>
Date: 2017-12-08T22:00:51Z
make addWaiter public and fix exception handling
KafkaFuture.thenApply(...) only allows invoking a callback on normal
completion.
Making KafkaFuture.addWaiter(...) public makes possible to invoke a
callback on exceptional completion as well.
Exceptions thrown by waiters could have prevented other waiters from
executing, possibly breaking KafkaFuture.allOf(), so it seemed advisable
to wrap waiters to catch and log exceptions before making this API public.
----
---