私のApacheカフカプロデューサー(0.9.0.1)が断続的にカフカは私がcatch (final ExecutionException executionException) {}
ブロック内NotLeaderForPartitionException
をキャッチ似ているにこのorg.apache.kafka.common.errors.NotLeaderForPartitionExceptionsを無視できますか?
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());
}
を送る行い
org.apache.kafka.common.errors.NotLeaderForPartitionException
私のコードをスローします。
この例外は無視してもよろしいですか?
私のカフカメッセージは正常に送信されましたか?