kaffe icon indicating copy to clipboard operation
kaffe copied to clipboard

Add support of per-topic configuration

Open romul opened this issue 3 years ago • 0 comments

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
    ]
}

romul avatar Sep 15 '22 13:09 romul