продюсер Мои Apache Кафка (0.9.0.1) периодически бросаетМогу ли я игнорировать org.apache.kafka.common.errors.NotLeaderForPartitionExceptions?
org.apache.kafka.common.errors.NotLeaderForPartitionException
Мой код, который выполняет Кафка отправить это напоминает
final Future<RecordMetadata> futureRecordMetadata = KAFKA_PRODUCER.send(new ProducerRecord<String, String>(kafkaTopic, UUID.randomUUID().toString(), jsonMessage));
try {
futureRecordMetadata.get();
} catch (final InterruptedException interruptedException) {
interruptedException.printStackTrace();
throw new RuntimeException("sendKafkaMessage(): Failed due to InterruptedException(): " + sourceTableName + " " + interruptedException.getMessage());
} catch (final ExecutionException executionException) {
executionException.printStackTrace();
throw new RuntimeException("sendKafkaMessage(): Failed due to ExecutionException(): " + sourceTableName + " " + executionException.getMessage());
}
Ловлю NotLeaderForPartitionException
внутри catch (final ExecutionException executionException) {}
блока.
Можно ли игнорировать это конкретное исключение?
Получено ли мое сообщение Kafka успешно?