freddy v0.10.1 Freddy.Notifications.Broadcaster
Freddy.Publisher special case.
This module allows to publish messages to freddy-topic exchange.
See documentation for Freddy.Publisher.
Link to this section Summary
Functions
Publish message with the given routing_key and payload to “freddy-topic” exchange.
The message will be encoded to JSON before publication
Starts a Freddy.Broadcaster process linked to the current process
Link to this section Functions
Link to this function
broadcast(broadcaster, routing_key, payload, opts \\ [])
Publish message with the given routing_key and payload to “freddy-topic” exchange.
The message will be encoded to JSON before publication.
Arguments:
broadcaster- the pid of aFreddy.Broadcasterprocessrouting_key- message routing keypayload- message payloadopts- AMQPbasic.publishoptions (seeAMQP.Basic.publish/5documentation)
Link to this function
call(consumer, message, timeout \\ 5000)
Link to this function
cast(consumer, message)
Link to this function
start_link(mod, conn, initial, opts \\ [])
start_link(module, GenServer.server, initial :: term, GenServer.options) :: GenServer.on_start
Starts a Freddy.Broadcaster process linked to the current process.
The process will be started by calling init with the given initial value.
Arguments:
mod- the module that defines the server callbacks (like GenServer)conn- the pid of aHare.Core.Connprocessinitial- the value that will be given toinit/1opts- the GenServer options
Link to this function
stop(consumer, reason \\ :normal)