Skip to content

NeatoRobotics/satellite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Satellite

Satellite helps you to easily start a pool of Consumers and Producers in your application

The following consumers are supported

  • Redis Pubsub
  • Amazon SQS
  • RabbitMQ

The following producers are supported

  • Redis
  • Amazon SQS
  • RabbitMQ

more details will be added soon...

Installation

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

Add configs

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:*"]
    }

Add Satellite to your application

  @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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages