exchange abstract method

Future<Exchange> exchange(
  1. String name,
  2. ExchangeType type, {
  3. bool passive = false,
  4. bool durable = false,
  5. bool noWait = false,
  6. bool declare = true,
  7. Map<String, Object> arguments,
})

Define an exchange named name of type type and return a Future<Exchange> when the exchange is allocated.

The passive flag can be used to test if the exchange exists. When passive is set to true, the returned future will fail with a ExchangeNotFoundException if the exchange does not exist.

The durable flag will enable the exchange to persist across server restarts.

The declare flag can be set to false to skip the exchange declaration step for clients with read-only access to the broker.

Implementation

Future<Exchange> exchange(String name, ExchangeType type,
    {bool passive = false,
    bool durable = false,
    bool noWait = false,
    bool declare = true,
    Map<String, Object> arguments});