freddy v0.9.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

See Freddy.Publisher.ack/1

See Freddy.Publisher.ack/2

Publish message with the given routing_key and payload to “freddy-topic” exchange. The message will be encoded to JSON before publication

See Freddy.Publisher.nack/1

See Freddy.Publisher.nack/2

See Freddy.Publisher.reject/1

See Freddy.Publisher.reject/2

Starts a Freddy.Broadcaster process linked to the current process

Link to this section Functions

See Freddy.Publisher.ack/1.

Link to this function ack(meta, opts)

See Freddy.Publisher.ack/2.

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 a Freddy.Broadcaster process
  • routing_key - message routing key
  • payload - message payload
  • opts - AMQP basic.publish options (see AMQP.Basic.publish/5 documentation)
Link to this function call(consumer, message, timeout)

See Freddy.Publisher.call/3.

See Freddy.Publisher.nack/1.

Link to this function nack(meta, opts)

See Freddy.Publisher.nack/2.

See Freddy.Publisher.reject/1.

Link to this function reject(meta, opts)

See Freddy.Publisher.reject/2.

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 a Hare.Core.Conn process
  • initial - the value that will be given to init/1
  • opts - the GenServer options