Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow config override #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/org/purefn/river/batch.clj
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@
- `::topics` The topics to consumer from.

- `::bootstrap-servers` hostname:port of a broker in the Kafka cluster to sink from.
Prefers the `bootstrap-servers` config item over `bootstrap.servers` if both are available.
Using the `.` version means we cannot override with env vars when needed.`

- `::threads` The number of threads (consumers) to create for each topic.
(default 4)
Expand All @@ -140,7 +142,8 @@
([config]
{::threads 4
::timeout 10000
::bootstrap-servers (get-in config ["kafka" "bootstrap.servers"])}))
::bootstrap-servers (or (get-in config ["kafka" "bootstrap-servers"])
(get-in config ["kafka" "bootstrap.servers"]))}))

(defn batch-consumer
"Constructor, takes a config and a 2 arg process-fn.
Expand Down