mix rambla.rabbit.exchange (Rambla v0.15.0) View Source

Mix task to deal with exchanges in the target RabbitMQ.

This is helpful to orchestrate target RabbitMQ when deploying to docker. Allows to create and delete the exchange.

Loads the setting from config :rambla, :amqp if no connection is provided in parameters.

Command line options

  • -c - the connection string
  • -o - the list of options without spaces, separated by comma


Options for create

  • type - One of four possible values below. Defaults to :direct.
    • direct
    • fanout
    • topic
    • headers
  • durable - If set, keeps the Exchange between restarts of the broker;
  • auto_delete - If set, deletes the Exchange once all queues unbind from it;
  • passive - If set, returns an error if the Exchange does not already exist;
  • internal - If set, the exchange may not be used directly by publishers, but only when bound to other exchanges. Internal exchanges are used to construct wiring that is not visible to applications.
  • no_wait - If set, the declare operation is asynchronous. Defaults to false.
  • arguments - A list of arguments to pass when declaring (of type AMQP.arguments/0). See the README for more information. Defaults to [].

Options for delete

  • if_unused - If set, the server will only delete the exchange if it has no queue bindings.
  • no_wait - If set, the delete operation is asynchronous.

Link to this section Summary

Link to this section Types


command() :: :declare | :create | :delete