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

Add support of per-topic configuration #131

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

romul
Copy link

@romul romul commented Sep 15, 2022

Closes #130 & #14

Configuration format now looks like:

config :kaffe,
  consumers: %{
    "subscriber_1" => [
      endpoints: [kafka: 9092],
      topics: ["interesting-topic"],
      consumer_group: "your-app-consumer-group",
      message_handler: MessageHandler,
      offset_reset_policy: :reset_to_latest,
      max_bytes: 100_000,
      min_bytes: 10_000,
      max_wait_time: 1_000,
      worker_allocation_strategy: :worker_per_topic_partition
    ],
    "subscriber_2" => [
      endpoints: [kafka: 9092],
      topics: ["topic-2"],
      consumer_group: "your-app-consumer-group",
      message_handler: AnotherMessageHandler,
      offset_reset_policy: :reset_to_latest,
      max_bytes: 50_000,
      worker_allocation_strategy: :worker_per_topic_partition
    ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

It's impossible to create 2 separate consumers for different topics
1 participant