From: Kai Moritz Date: Thu, 20 Feb 2025 17:59:22 +0000 (+0100) Subject: Einrückung so, wie es IntelliJ will... X-Git-Tag: grundlagen/simple-producer--COMMITS--2025-02 X-Git-Url: https://juplo.de/gitweb/?a=commitdiff_plain;h=3bd6c54ef093aafe63cc2666b32fe752f2290c8a;p=demos%2Fkafka%2Ftraining Einrückung so, wie es IntelliJ will... --- 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(); } }