A message queue framework, with support for middleware and multiple adapters.
Clone or download
Allen Madsen Allen Madsen
Allen Madsen and Allen Madsen Bump versions
Latest commit 0185b25 Nov 17, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Bump elixir version for ci Oct 26, 2018
.vscode Allow content type and encoding to be stored in other parts of the me… Dec 31, 2017
config Accept message as first arg to Broker.publish/3. Deprecate previous u… Sep 9, 2018
guides
lib Switch order to remove deprecation Nov 16, 2018
test Fix test for dead letter Nov 17, 2018
.credo.exs Refactor macros to better support functions Sep 3, 2018
.formatter.exs Improve error for receives Apr 20, 2018
.gitignore Fix for mqtt to allow adapter to specify the source. Oct 19, 2018
CHANGELOG.md Bump versions Nov 17, 2018
LICENSE.md Add license Nov 20, 2016
README.md Include newer guides Jun 25, 2018
dialyzer.ignore-warnings Update docs and typespecs Apr 30, 2018
logo.png Include newer guides Jun 25, 2018
mix.exs
mix.lock Refactor macros to better support functions Sep 3, 2018

README.md

Conduit

CircleCI Coveralls Hex.pm Hex.pm Hex.pm

A message queue framework, with support for middleware and multiple adapters.

Check out this slide deck for more info.

Installation

The package can be installed as:

  1. Add conduit to your list of dependencies in mix.exs:
def deps do
  [{:conduit, "~> 0.10"}]
end
  1. If you are explicitly stating which applications to start, ensure conduit is started before your application:
def application do
  [applications: [:conduit]]
end

Getting Started

Once conduit is added to your project, you can generate a broker. For example:

mix conduit.gen.broker --adapter amqp
mix conduit.gen.broker --adapter sqs

The Broker is responsible for describing how to setup your message queue routing, defining subscribers, publishers, and pipelines for subscribers and publishers.

See mix help conduit.gen.broker for all the options that are available. For example, specifying the adapter to use.

Officially Supported Adapters

In the future more adapters will be supported.

Configuring the Broker Topology

MQ's have queues which need to be setup and may involve other concepts as well, including exchanges and bindings. Conduit attemps to stay out of the way when you need to define these things because each MQ has a different opinion on what you need.

Because of that, you'll need to looks at the specific adapter for what options are available.

Configuring a Subscriber

A subscriber is responsible for processing messages from a message queue. Typically, you'll have one subscriber per queue. You can generate a subscriber by doing:

mix conduit.gen.subscriber user_created

See mix help conduit.gen.subscriber for all the options that are available.

You can find more information about configuring your subscriber in the adapter specific docs here:

Configuring a Publisher

A publisher is responsible for sending messages. You can find more information abount configuring publishers in the adapter specific docs here: