Satellite helps you to easily start a pool of Consumers and Producers in your application
- Redis Pubsub
- Amazon SQS
- RabbitMQ
- Redis
- Amazon SQS
- RabbitMQ
more details will be added soon...
Add the :satellite
dependency to your mix.exs
file. If you plan on connecting to a Redis server over SSL you may want to add the optional :castore
dependency as well:
def deps do
[
{:satellite, "~> 0.1.0"},
{:castore, ">= 0.0.0"}
]
end
config :satellite,
enabled: true,
origin: "my_app",
producer: {Satellite.RedisProducer, %{host: "127.0.0.1", port: 6379}},
consumer:
{Satellite.RedisConsumer,
connection: [
host: "127.0.0.1",
port: 6379
],
channels: ["robot:*" ,"user:*"]
}
@impl true
def start(_type, _args) do
children = [
# Starts Satellite
{Satellite, []}
]
# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and supporte
d options
opts = [strategy: :one_for_one, name: Antenna.Supervisor]
Supervisor.start_link(children, opts)
end