Packages
kafka_message_bus
4.0.0-rc.3
4.3.4
4.3.3
4.3.2
4.3.1
4.3.0
4.2.10
4.2.9
4.2.8
4.2.7
4.2.6
4.2.5
4.2.4
4.2.3
4.2.2
4.2.1
4.2.0
4.1.1
4.1.0
4.0.1
4.0.0
4.0.0-rc.8
4.0.0-rc.7
4.0.0-rc.6
4.0.0-rc.5
4.0.0-rc.4
4.0.0-rc.3
4.0.0-rc.2
3.0.0
2.2.4
2.2.3
2.2.2
2.2.1
2.2.0
2.1.0
2.0.2
2.0.1
2.0.0
1.0.1
1.0.0
0.2.3
0.2.2
0.2.1
0.2.0
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
A general purpose messaging utility library supporting Exq and Kaffe
Current section
Files
Jump to
Current section
Files
kafka_message_bus
README.md
README.md
# KafkaMessageBus
A general purpose message bus.
## Installation
The package can be installed by adding `kafka_message_bus` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[{:kafka_message_bus, "~> 3.0"}]
end
```
And, for now, this configuration is required:
```elixir
config :exq,
start_on_application: false
```
## Usage
The following configuration is expected:
```elixir
config :kafka_message_bus,
source: "source",
default_topic: "default_topic",
adapters: [
AdapterModule
]
```
Where:
|Field |Description |
|---------------|----------------------------------------------------------|
|`source` |The reported message source |
|`default_topic`|The default topic for any generated message |
|`adaters` |A list of adapter modules. `Exq` and `Kaffe` are provided.|
The adapters themselves also require some configuration.
```elixir
config :kafka_message_bus, KafkaMessageBus.Adapters.Kaffe,
consumers: [
{"kafka_topic", "kafka_resource", YourApp.ResourceConsumer}
],
producers: ["another_topic"],
endpoints: ["first-broker": 9092, "second-broker": 9092],
namespace: "kafka_consumer_group"
```