From dfe2e33431d722cc6a4dcdf4bae90ecc8cb9fb8f Mon Sep 17 00:00:00 2001 From: croway Date: Fri, 4 Sep 2026 09:01:26 +0200 Subject: [PATCH] Fix kafka-offsetrepository example: single broker, gitignored offset file - kafka.bootstrap.url now lists a single broker (localhost:9092) to match `camel infra run kafka`, which only starts one broker. The previous 3-broker list caused harmless but noisy connection WARNs. - fileOffsetrepoPath now points under target/ instead of src/main/resources, and the previously tracked offsetStateRepo.dat is removed from git. Running the example mutated this file, dirtying the working tree on every run; target/ is already gitignored. Verified by running `camel infra run kafka` (single broker on 9092) and `mvn spring-boot:run`: producer/consumer routes work with no broker WARNs, and offsetStateRepo.dat is written to target/ leaving git status clean. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01Tgb2b9DSh1ncG7C82rwzsE --- .../src/main/resources/application.properties | 4 ++-- kafka-offsetrepository/src/main/resources/offsetStateRepo.dat | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) delete mode 100644 kafka-offsetrepository/src/main/resources/offsetStateRepo.dat diff --git a/kafka-offsetrepository/src/main/resources/application.properties b/kafka-offsetrepository/src/main/resources/application.properties index a1cada9ab..a934ca5fe 100644 --- a/kafka-offsetrepository/src/main/resources/application.properties +++ b/kafka-offsetrepository/src/main/resources/application.properties @@ -17,8 +17,8 @@ ## Modify value of kafka.host and kafka.port before running application -kafka.bootstrap.url=localhost:9092,localhost:9093,localhost:9094 -fileOffsetrepoPath=src/main/resources/offsetStateRepo.dat +kafka.bootstrap.url=localhost:9092 +fileOffsetrepoPath=target/offsetStateRepo.dat # Producer properties producer.topic=my-topic diff --git a/kafka-offsetrepository/src/main/resources/offsetStateRepo.dat b/kafka-offsetrepository/src/main/resources/offsetStateRepo.dat deleted file mode 100644 index 48c0860f0..000000000 --- a/kafka-offsetrepository/src/main/resources/offsetStateRepo.dat +++ /dev/null @@ -1 +0,0 @@ -my-topic/0=41