mirror of
https://github.com/jlengrand/helidon.git
synced 2026-03-10 08:21:17 +00:00
Log Kafka sending error which caused channel cancel (#2447)
Signed-off-by: Daniel Kec <daniel.kec@oracle.com>
This commit is contained in:
@@ -96,6 +96,7 @@ public class KafkaSubscriber<K, V> implements Subscriber<Message<V>> {
|
||||
kafkaProducer.send(record, (metadata, exception) -> {
|
||||
if (exception != null) {
|
||||
subscription.cancel();
|
||||
LOGGER.log(Level.WARNING, "Error when sending kafka message to topic: " + topic, exception);
|
||||
completableFuture.completeExceptionally(exception);
|
||||
} else {
|
||||
completableFuture.complete(null);
|
||||
|
||||
Reference in New Issue
Block a user