Proca.Pipes.Connection (proca v3.4.1)

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Allow setting SSL client connection options

Attempts to connect to queue. It can succeed and enter status: :connected Or it can fail and enter status: :reconnecting

Reconnecting procedure - shutdown processing and schedule connection attempt after_seconds

Connect, (todo: reconnect) functionality

Publish data to exchange with a routing key.

Link to this section Functions

Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Allow setting SSL client connection options

Link to this function

connection_url()

Attempts to connect to queue. It can succeed and enter status: :connected Or it can fail and enter status: :reconnecting

Link to this function

do_reconnecting(map, after_seconds)

Reconnecting procedure - shutdown processing and schedule connection attempt after_seconds

Link to this function

handle_continue(atom, st)

Connect, (todo: reconnect) functionality

Link to this function

is_connected?()

Link to this function

publish(data, exchange, routing_key, channel \\ nil)

Specs

publish(map(), String.t(), String.t(), AMQP.Channel | nil) ::
  :ok | {:error, term()}

Publish data to exchange with a routing key.

You can pass a channel to re-use it.

Error values: {:error, :reconnectiong | other} - can come from connection() call or opening a channel (though that should not result in an error) or publishing :error - any error with JSON.encode / other errors

Link to this function

start_link(url)