Jackalope

CircleCIHex version

Jackalope is an opinionated MQTT library that simplifies the use of Tortoise MQTT with cloud IoT services.

Jackalope aims to make an interface that:

Besides this Jackalope aims to provide helpers for local testing, allowing you to test your application without having a connection to AWS; Jackalope should take care of that.

Usage

The Jackalope module implements a start_link/1 function; use this to start Jackalope as part of your application supervision tree. If properly supervised it will allow you to start and stop Jackalope with the part the application that needs MQTT connectivity. Jackalope is configured using a keyword list, consult the Jackalope.start_link/1 documentation for information on the available option values.

Once Jackalope is running it is possible to subscribe, unsubscribe, and publish messages to the broker; in addition to this there are some connection specific functionality is exposed, allowing us to ask for the connection status, and request a connection reconnect.

Please see the documentation for each of the functions for more information on usage; especially the subscribe and publish functions accepts options such as setting quality of service and time to live.

Installation

If available in Hex, the package can be installed by adding jackalope to your list of dependencies in mix.exs:

def deps do
  [
    {:jackalope, "~> 0.1.0"}
  ]
end