Method: AMQP::Channel#default_exchange
- Defined in:
- lib/amqp/channel.rb
#default_exchange ⇒ Exchange
Returns exchange object with the same name as default (aka unnamed) exchange. Default exchange is a direct exchange and automatically routes messages to queues when routing key matches queue name exactly. This feature is known as “automatic binding” (of queues to default exchange).
Use default exchange when you want to route messages directly to specific queues (queue names are known, you don’t mind this kind of coupling between applications).
491 492 493 |
# File 'lib/amqp/channel.rb', line 491 def default_exchange @default_exchange ||= Exchange.default(self) end |