amqpx / index / predefined / defaultExchange
Function: defaultExchange()
defaultExchange(
channel):Exchange
Defined in: src/predefined.ts:104
This will create a default exchange that is created by default by the broker. Behaves like direct exchange, but has special property that every queue created within the cluster is automatically bound to this exchange with routing key equal to queue name.
The default exchange has empty string as a name ("").
This is the only way to create a default exchange in the application, because it can't be asserted and thus the standard exchange implementation can't be used.
Parameters
| Parameter | Type | Description |
|---|---|---|
channel | Channel | The channel that should check the exchange. |
Returns
The exchange that was created