[jira] [Resolved] (KAFKA-6987) Reimplement KafkaFuture with CompletableFuture
[ https://issues.apache.org/jira/browse/KAFKA-6987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Konstantine Karantasis resolved KAFKA-6987. --- Resolution: Fixed > Reimplement KafkaFuture with CompletableFuture > -- > > Key: KAFKA-6987 > URL: https://issues.apache.org/jira/browse/KAFKA-6987 > Project: Kafka > Issue Type: Improvement > Components: clients >Affects Versions: 2.0.0 >Reporter: Andras Beni >Assignee: Tom Bentley >Priority: Minor > Labels: kip, needs-review > Fix For: 3.0.0 > > > KafkaFuture documentation states: > {{This will eventually become a thin shim on top of Java 8's > CompletableFuture.}} > With Java 7 support dropped in 2.0, it is time to get rid of custom code. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (KAFKA-12227) Return CompletableFuture from KafkaProducer.send
Chia-Ping Tsai created KAFKA-12227: -- Summary: Return CompletableFuture from KafkaProducer.send Key: KAFKA-12227 URL: https://issues.apache.org/jira/browse/KAFKA-12227 Project: Kafka Issue Type: Improvement Reporter: Chia-Ping Tsai Producer and KafkaProducer return a java.util.concurrent.Future from their send methods. This makes it challenging to write asynchronous non-blocking code given Future's limited interface. Since Kafka now requires Java 8, we now have the option of using CompletionStage and/or CompletableFuture that were introduced to solve this issue. It's worth noting that the Kafka AdminClient solved this issue by using org.apache.kafka.common.KafkaFuture as Java 7 support was still required then. https://cwiki.apache.org/confluence/display/KAFKA/KIP-XXX%3A+Return+CompletableFuture+from+KafkaProducer.send -- This message was sent by Atlassian Jira (v8.3.4#803005)
Re: CompletableFuture?
I'm currently doing my own completableFutures by using the callbacks. While i wont have the time to do this myself, I still think its a great idea and would prevent more people from having to do what I'm currently doing. On Wed, Jan 15, 2020 at 6:57 AM Vamsi Subahsh wrote: > > Hi, > > I'm interested in picking this up as I have already worked on internal code > bases to make a wrapper on current Api to make it expose CompletableFuture > (using callbacks in the current api). > > Could you give me comment/edit access to the confluence doc, I can write up > the new api and the logic proposal? > > Regards, > Vamsi Subhash > > > > On Wed, 15 Jan 2020 at 19:59, Ismael Juma wrote: > > > Good question. I have a draft KIP for the producer change: > > > > > > https://cwiki.apache.org/confluence/display/KAFKA/KIP-XXX%3A+Return+CompletableFuture+from+KafkaProducer.send > > > > I was still debating which was the best path forward (i.e. what should be > > in rejected alternatives versus the actual proposal). Feedback is welcome. > > You're also welcome to take over the KIP if you have the cycles and > > interest. > > > > Ismael > > > > On Tue, Jan 14, 2020 at 8:27 PM radai wrote: > > > > > Hi > > > > > > With kip-118 (Drop Support for Java 7) officially done, is there a > > > timeline replacing usage of "plain" Futures with java 8 > > > CompletableFutures? > > > > > > kafka 2.0 was mentioned at some point as a possible target for this ... > > > > >
Re: CompletableFuture?
Hi, I'm interested in picking this up as I have already worked on internal code bases to make a wrapper on current Api to make it expose CompletableFuture (using callbacks in the current api). Could you give me comment/edit access to the confluence doc, I can write up the new api and the logic proposal? Regards, Vamsi Subhash On Wed, 15 Jan 2020 at 19:59, Ismael Juma wrote: > Good question. I have a draft KIP for the producer change: > > > https://cwiki.apache.org/confluence/display/KAFKA/KIP-XXX%3A+Return+CompletableFuture+from+KafkaProducer.send > > I was still debating which was the best path forward (i.e. what should be > in rejected alternatives versus the actual proposal). Feedback is welcome. > You're also welcome to take over the KIP if you have the cycles and > interest. > > Ismael > > On Tue, Jan 14, 2020 at 8:27 PM radai wrote: > > > Hi > > > > With kip-118 (Drop Support for Java 7) officially done, is there a > > timeline replacing usage of "plain" Futures with java 8 > > CompletableFutures? > > > > kafka 2.0 was mentioned at some point as a possible target for this ... > > >
Re: CompletableFuture?
Good question. I have a draft KIP for the producer change: https://cwiki.apache.org/confluence/display/KAFKA/KIP-XXX%3A+Return+CompletableFuture+from+KafkaProducer.send I was still debating which was the best path forward (i.e. what should be in rejected alternatives versus the actual proposal). Feedback is welcome. You're also welcome to take over the KIP if you have the cycles and interest. Ismael On Tue, Jan 14, 2020 at 8:27 PM radai wrote: > Hi > > With kip-118 (Drop Support for Java 7) officially done, is there a > timeline replacing usage of "plain" Futures with java 8 > CompletableFutures? > > kafka 2.0 was mentioned at some point as a possible target for this ... >
CompletableFuture?
Hi With kip-118 (Drop Support for Java 7) officially done, is there a timeline replacing usage of "plain" Futures with java 8 CompletableFutures? kafka 2.0 was mentioned at some point as a possible target for this ...