View Source Barytherium.DefaultCallbackHandler (barytherium v0.2.0)

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

(1)> {:ok, bdcbh_pid} = Barytherium.DefaultCallbackHandler.start_link('example.com', 61613, "/", [{"login", "grimAuxiliatrix"}, {"passcode", "hunter2"}, {"heart-beat", "5000,5000"}], [%Barytherium.Frame{command: :subscribe, headers: [{"id", "0"}, {"destination", "/amq/queue/darwin-v16-gzip"}, {"ack", "client"}]}])
{:ok, #PID<0.270.0>}
(2)>
20:44:51.229 [info] Connection to example.com:61613 succeeded, remote end has picked up

20:44:51.406 [info] Received connected frame: %Barytherium.Frame{command: :connected, headers: [{"server", "RabbitMQ/3.10.5"}, {"session", "session-1uw6oN9eUYg8MyRacmDcnw"}, {"heart-beat", "5000,5000"}, {"version", "1.2"}], body: ""}

20:44:51.710 [info] Unpacked final frame in list: %Barytherium.Frame{command: :message,...

Link to this section Summary

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

handle_frame(list, sender_pid)

View Source

Callback implementation for GenServer.init/1.

Link to this function

start_link(host, port, virtual_host, connect_headers \\ [], connected_frames \\ [], opts \\ %{}, link_opts \\ [])

View Source