tombentley commented on pull request #9878:
URL: https://github.com/apache/kafka/pull/9878#issuecomment-764708623


   > It's a good thing that CompletionStage doesn't expose those methods 
directly, in my opinion. As you said, you can call toCompletedFuture to get 
them if you really want them.
   
   It makes perfect sense for the use cases targeted by that API, where random 
blocking in an async pipeline is to be avoided. But many people who use the 
Admin client want to do so in a synchronous style. They already have to invoke 
`KafkaFuture.get` to do that, having to do `toCompletableFuture().get()` makes 
the API less discoverable and just slightly more painful to those who want 
sync.  They likely wouldn't see a switch to plain CompletionStage as an 
improvement. 
   
   > I think the challenge is that there is no good way to retrofit 
KafkaFuture. I think the only viable approach I've seen so far is to add the 
toCompletableFuture/toCompletionStage methods.
   
   It seems to be the only completely backwards compatible thing we can do.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to