An Exchange declaration (kombu.entity.Exchange).
Summary
Functions
Converts the exchange into a dictionary/map representation (as_dict).
Raises Kombu.NotBoundError if neither exchange.channel nor channel is bound.
Returns a copy of exchange bound to channel.
Binds this exchange to source exchange (exchange.bind_to).
Creates a %Kombu.Binding{} for this exchange.
Returns true if the exchange is bound to a channel.
Returns true if declaration of this exchange can be cached (not auto_delete).
Returns true if this exchange should be declared on the broker.
Exchanges with no_declare: true, empty name "", or starting with "amq." are not declared.
Declares the exchange on the broker channel if can_declare?/1 is true.
Deletes the exchange from the broker.
Returns the delivery modes mapping.
Compares two %Kombu.Exchange{} structs for value equality (ignoring channel binding).
Checks if two exchange declarations are equivalent (type, durable, auto_delete, arguments),
matching kombu.transport.virtual.exchange.ExchangeType.is_equivalent.
Binds the exchange to channel if not already bound and channel is non-nil.
Normalizes a delivery mode ("transient", "persistent", :transient, :persistent, 1, 2)
into its integer representation (1 or 2). Defaults to 2 (persistent) when nil.
Creates a prepared message map to be published to this exchange (Exchange.Message).
Constructs a %Kombu.Exchange{} struct, or returns an existing %Kombu.Exchange{}
(optionally binding it to opts[:channel]).
Returns the persistent delivery mode constant (2).
Publishes a prepared message to the exchange.
Accepts either publish(exchange, message, opts) or publish(exchange, message, routing_key, opts \ []).
Revives the exchange with a new channel (Exchange.revive).
Returns the transient delivery mode constant (1).
Unbinds this exchange from source exchange (exchange.unbind_from).
Types
Functions
Converts the exchange into a dictionary/map representation (as_dict).
@spec assert_bound!(t(), Kombu.Channel.t() | nil) :: Kombu.Channel.t()
Raises Kombu.NotBoundError if neither exchange.channel nor channel is bound.
@spec bind(t(), Kombu.Channel.t() | nil) :: t()
Returns a copy of exchange bound to channel.
Binds this exchange to source exchange (exchange.bind_to).
@spec binding(t(), keyword()) :: Kombu.Binding.t()
Creates a %Kombu.Binding{} for this exchange.
Returns true if the exchange is bound to a channel.
Returns true if declaration of this exchange can be cached (not auto_delete).
Returns true if this exchange should be declared on the broker.
Exchanges with no_declare: true, empty name "", or starting with "amq." are not declared.
Declares the exchange on the broker channel if can_declare?/1 is true.
Deletes the exchange from the broker.
@spec delivery_modes() :: map()
Returns the delivery modes mapping.
Compares two %Kombu.Exchange{} structs for value equality (ignoring channel binding).
Checks if two exchange declarations are equivalent (type, durable, auto_delete, arguments),
matching kombu.transport.virtual.exchange.ExchangeType.is_equivalent.
@spec maybe_bind(t(), Kombu.Channel.t() | nil) :: t()
Binds the exchange to channel if not already bound and channel is non-nil.
Normalizes a delivery mode ("transient", "persistent", :transient, :persistent, 1, 2)
into its integer representation (1 or 2). Defaults to 2 (persistent) when nil.
Creates a prepared message map to be published to this exchange (Exchange.Message).
Constructs a %Kombu.Exchange{} struct, or returns an existing %Kombu.Exchange{}
(optionally binding it to opts[:channel]).
@spec persistent_delivery_mode() :: 2
Returns the persistent delivery mode constant (2).
Publishes a prepared message to the exchange.
Accepts either publish(exchange, message, opts) or publish(exchange, message, routing_key, opts \ []).
Revives the exchange with a new channel (Exchange.revive).
@spec transient_delivery_mode() :: 1
Returns the transient delivery mode constant (1).
Unbinds this exchange from source exchange (exchange.unbind_from).