A wrapper around KafkaEx so you can mock it in test.
Available in Hex, the package can be installed as:
- Add
kafka_impl
to your list of dependencies inmix.exs
:
```elixir
def deps do
[{:kafka_impl, "~> 0.1.0"}]
end
```
- Ensure
kafka_impl
is started before your application:
```elixir
def application do
[applications: [:kafka_impl]]
end
```
Need more documentation here, but check out kafkamon to see this library in use.
In your config/config.exs
, add:
config :kafka_impl, :impl, KafkaImpl.KafkaEx
In your config/test.exs
, add:
config :kafka_impl, :impl, KafkaImpl.KafkaMock