If available in Hex, the package can be installed
by adding builex_poller
to your list of dependencies in mix.exs
:
def deps do
[
{:buildex_poller, "~> 0.1.0"}
]
end
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/builex_poller.
- BuildexPoller polls GitHub repos for new tags
- if there are new tags it publishes a message to RabbitMQ using the connection/channels pool
- ExRabbitPool creates a pool of connections to RabbitMQ
- each connection worker traps exits and links the connection process to it
- each connection worker creates a pool of channels and links them to it
- when a client checks out a channel out of the pool the connection worker monitors that client to return the channel into it in case of a crash
- BuildexPoller polls GitHub repos for new tags
- if there are new tags it publishes a message to RabbitMQ using the connection/channels pool
# default System.get_env("GITHUB_AUTH")
config :builex_poller, :github_auth, GITHUB_TOKEN
# Which queue/exchange is BuildexPoller going to use
config :builex_poller,
queue: QUEUE_NAME,
exchange: ""
# RabbitMQ Connection Config - Setting up rabbimq for us
config :builex_poller, :rabbitmq_config,
port: 5672,
channels: 1000,
# OPTIONAL - Setting up rabbimq queues/exchanges/bindings for us
queues: [
queue_name: "",
exchange: ""
]
# RabbitMQ Connection Pool Config
config :builex_poller, :rabbitmq_conn_pool,
pool_id: POOL_NAME,
name: {:local, POOL_NAME},
worker_module: ExRabbitPool.Worker.RabbitConnection,
size: 2,
max_overflow: 0