Re: ExecutionException instead of UnknownTopicOrPartitionException

2015-07-15 Thread Guozhang Wang
Hi Jean-Charles, The Future.get() will always throw an ExecutionException(Throwable: CauseException), so in your code should look like sth.: --- try { future = producer.send(..); } catch (KafkaException e) { // handle any KafkaException that is not ApiException. } try {

ExecutionException instead of UnknownTopicOrPartitionException

2015-07-15 Thread Jean-Charles Jabouille
Hi, I'm currently developing an application to use Kafka in Java. My application just push an offer synchronously in a topic. I have 3 brokers and 3 zookeeper instance. I want to catch Exception in order my process does not crash but try to retry and do some code for specific exception. So I