This is an automated email from the ASF dual-hosted git repository.

Croway pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot-examples.git


The following commit(s) were added to refs/heads/main by this push:
     new 123aa3f1 Fix kafka-offsetrepository example: single broker, gitignored 
offset file
123aa3f1 is described below

commit 123aa3f19d6ac2ef654f717d47a9263b9d4231f1
Author: croway <[email protected]>
AuthorDate: Fri Sep 4 09:01:26 2026 +0200

    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 <[email protected]>
    Claude-Session: https://claude.ai/code/session_01Tgb2b9DSh1ncG7C82rwzsE
---
 kafka-offsetrepository/src/main/resources/application.properties | 4 ++--
 kafka-offsetrepository/src/main/resources/offsetStateRepo.dat    | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/kafka-offsetrepository/src/main/resources/application.properties 
b/kafka-offsetrepository/src/main/resources/application.properties
index a1cada9a..a934ca5f 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 48c0860f..00000000
--- a/kafka-offsetrepository/src/main/resources/offsetStateRepo.dat
+++ /dev/null
@@ -1 +0,0 @@
-my-topic/0=41

Reply via email to