API Reference barytherium v0.7.0

modules

Modules

Barytherium is an Elixir STOMP client, and a replacement for Mammoth/Elephant, with the aim of improving performance, particularly for high-volume binary message queues (such as National Rail Enquiries' Darwin push port)

Handles connection logic for both secure (SSL) and non-secure (TCP) connections.

This module serves as a more-or-less self-contained example of how to use Barytherium in your own project.

Representation of a STOMP frame.

Macros for defining parse parse functions for commands, for both LF and CRLF versions.

ValueEncoding functions for STOMP. This is handled automatically by functions in Barytherium.Frame

Responsible for coordinating Sender and Receiver. Note that when started, this will immediately (and asynchronously) try to connect to the given host and port.

The Parser receives binary data from a Barytherium.Network.Receiver process via casts, parses these into STOMP frames, then casts these on to the listener process. If there's an error parsing, this is reported to Barytherium.Network as a disconnect.

The Receiver is designed to work with Barytherium.Network to move frames from an already opened socket, reporting status back to an instance of Barytherium.Network, and frames onwards to the parser. This is implemented as a loop with no message receiving capabilities, outside of the reply made to a call to Barytherium.Network to report the CONNECTED frame, for which it receives back a tuple which sets out the heartbeats. The loop ends on most error conditions, including those which can be created elsewhere (e.g. if it gets {:error, :closed} when calling recv).