Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brodex

Installation

If available in Hex, the package can be installed by adding brodex to your list of dependencies in mix.exs:

def deps do
  [
    {:brodex, git: "https://github.com/PRAVALER/brodex"}
  ]
end

Configuration

See config/config.exs for a description of configuration variables, including the Kafka broker list and default consumer group.

Consumer Configs

import Config

alias BrodexExampleWeb.ConsumerTest

config :brodex,
    kafka_topics: [
      %{name: :topic_test, topic: "topic-test", partitions: :all, module: ConsumerTest}
    ]

Usage Examples

Consumer Groups

To use a consumer group, first implement a handler module using Brodex.Consumer.

defmodule BrodexExampleWeb.ConsumerTest do

  use Brodex.Consumer

  @impl true
  def handler(data) do
    IO.inspect(data, label: "data")
    {:ok, true}
  end
end

About

simple lib kafka

Topics

Resources

Stars

6 stars

Watchers

14 watching

Forks

Releases

Packages

Contributors

Languages