WhiteRabbit.Producer.publish

You're seeing just the function publish, go back to WhiteRabbit.Producer module for more information.
Link to this function

publish(conn_tuple, exchange, routing_key, message, options)

View Source

Specs

publish(
  conn_tuple :: tuple(),
  exchange :: String.t(),
  routing_key :: String.t(),
  message :: any(),
  options :: publish_options()
) :: on_publish()
publish(
  channel :: AMQP.Channel.t(),
  exchange :: String.t(),
  routing_key :: String.t(),
  message :: term(),
  options :: Keyword.t()
) :: :ok

Tries to publish message with a channel from a pool if a channel is found.

Returns :ok if successful

Options: publish_options

Attaches some :telemetry events as well:

  • [:white_rabbit, :publish, :start]

  • measurements:

    • time: :naive unix timestamp
    • count: 1
  • [:white_rabbit, :publish, :stop]

  • measurements:

    • duration: :naive unix timestamp
    • count: 1
  • metadata: %{ connpool: connpool, exchange: exchange, routing_key: routing_key, module: __MODULE }