Fix kafka-offsetrepository example: single broker, gitignore offset file - #199
Open
Croway wants to merge 1 commit into
Open
Fix kafka-offsetrepository example: single broker, gitignore offset file#199Croway wants to merge 1 commit into
Croway wants to merge 1 commit into
Conversation
…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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tgb2b9DSh1ncG7C82rwzsE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
kafka.bootstrap.urlin thekafka-offsetrepositoryexample listed a 3-broker cluster (localhost:9092,9093,9094), but the README'scamel infra run kafkaonly starts a single broker — this produced noisy but harmless connection WARNs. Simplified tolocalhost:9092.fileOffsetrepoPathpointed at a tracked file undersrc/main/resources/offsetStateRepo.dat, which running the example mutates, dirtyinggit statuson every run. Moved it totarget/offsetStateRepo.dat(already covered by the repo'stargetgitignore rule) and removed the tracked file.Test plan
mvn compilesucceedscamel infra run kafkaand confirmed only one broker container comes up on port 9092mvn spring-boot:run: producer/consumer routes exchange messages with no broker-connection WARNsoffsetStateRepo.datis written totarget/andgit statusstays clean after a run🤖 Generated with Claude Code
https://claude.ai/code/session_01Tgb2b9DSh1ncG7C82rwzsE