Packages
kafka_message_bus
4.2.1
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
lib/kafka_message_bus/application.ex
defmodule KafkaMessageBus.Application do
@moduledoc """
Application module for KafkaMessageBus. This kicks off the supervisor for
the app using the one_for_one strategy (restart failed processes only).
"""
alias KafkaMessageBus.Config
use Application
def start(_type, _args) do
Config.get_adapters!()
|> Enum.flat_map(fn adapter ->
adapter
|> Config.get_adapter_config!()
|> adapter.init()
|> case do
{:ok, child} -> [child]
:ok -> []
end
end)
|> Supervisor.start_link(strategy: :one_for_one)
end
end