From 3bd6c54ef093aafe63cc2666b32fe752f2290c8a Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Thu, 20 Feb 2025 18:59:22 +0100 Subject: [PATCH] =?utf8?q?Einr=C3=BCckung=20so,=20wie=20es=20IntelliJ=20wi?= =?utf8?q?ll...?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../java/de/juplo/kafka/ExampleProducer.java | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/main/java/de/juplo/kafka/ExampleProducer.java b/src/main/java/de/juplo/kafka/ExampleProducer.java index 772fc2b3..c3db7e7c 100644 --- a/src/main/java/de/juplo/kafka/ExampleProducer.java +++ b/src/main/java/de/juplo/kafka/ExampleProducer.java @@ -66,9 +66,9 @@ public class ExampleProducer final long time = System.currentTimeMillis(); final ProducerRecord record = new ProducerRecord<>( - topic, // Topic - key, // Key - value // Value + topic, // Topic + key, // Key + value // Value ); producer.send(record, (metadata, e) -> @@ -79,37 +79,37 @@ public class ExampleProducer // HANDLE SUCCESS produced++; log.debug( - "{} - Sent message {}={}, partition={}, offset={}, timestamp={}, latency={}ms", - id, - key, - value, - metadata.partition(), - metadata.offset(), - metadata.timestamp(), - now - time + "{} - Sent message {}={}, partition={}, offset={}, timestamp={}, latency={}ms", + id, + key, + value, + metadata.partition(), + metadata.offset(), + metadata.timestamp(), + now - time ); } else { // HANDLE ERROR log.error( - "{} - ERROR for message {}={}, latency={}ms: {}", - id, - key, - value, - now - time, - e.toString() + "{} - ERROR for message {}={}, latency={}ms: {}", + id, + key, + value, + now - time, + e.toString() ); } }); long now = System.currentTimeMillis(); log.trace( - "{} - Queued message {}={}, latency={}ms", - id, - key, - value, - now - time + "{} - Queued message {}={}, latency={}ms", + id, + key, + value, + now - time ); } @@ -148,10 +148,10 @@ public class ExampleProducer })); log.info( - "Running ExampleProducer: broker={}, topic={}, client-id={}", - broker, - topic, - clientId); + "Running ExampleProducer: broker={}, topic={}, client-id={}", + broker, + topic, + clientId); instance.run(); } } -- 2.20.1