Skip to content

amqpx v1.0.1


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

ParameterTypeDescription
channelChannelThe channel that should check the exchange.

Returns

Exchange

The exchange that was created

Released under the MIT License.