Packages

A wrapper for Kafka clients that provies a testing sandbox implmentation for easier kafka tests.

Current section

Files

Jump to
ghost lib ghost.ex
Raw

lib/ghost.ex

defmodule Ghost do
@config Application.get_env(:ghost, __MODULE__)
def produce_sync(topic, key, message) do
client = Keyword.get(@config, :client)
adapter = Keyword.get(@config, :adapter)
adapter.produce_sync(client, topic, key, message)
end
def produce(topic, key, message) do
client = Keyword.get(@config, :client)
adapter = Keyword.get(@config, :adapter)
adapter.produce(client, topic, key, message)
end
end