Method: Bunny::Channel#headers

Defined in:
lib/bunny/channel.rb

#headers(name, opts = {}) ⇒ Bunny::Exchange

Declares a headers exchange or looks it up in the cache of previously declared exchanges.

Parameters:

  • name (String)

    Exchange name

  • opts (Hash) (defaults to: {})

    Exchange parameters

Options Hash (opts):

  • :durable (Boolean) — default: false

    Should the exchange be durable?

  • :auto_delete (Boolean) — default: false

    Should the exchange be automatically deleted when no longer in use?

  • :arguments (Hash) — default: {}

    Optional exchange arguments

Returns:

See Also:



408
409
410
# File 'lib/bunny/channel.rb', line 408

def headers(name, opts = {})
  find_exchange(name) || Exchange.new(self, :headers, name, opts)
end