Skip to content

Allow control over exchange creation #112

@nahpeps

Description

@nahpeps

I recognized that is is not possible to control the process of creating an exchange.

In the Sub and Pub.connect functions the exchange is always created with a predefined set of exchange options:

ch.assertExchange(source,
                      this.options.routing || 'fanout',
                      {durable: false, autoDelete: false})
      .then(function(ok) {
        return ch.bindQueue(queue, source, topic);
      })
      .then(callback);
  }

Here the setting is always {durable: false, autoDelete: false}).

It would be really great to have the chance to overwrite these settings in the exchange creation.
This issue is to #63.

I would like to do something like:

ch.assertExchange(source,
                      this.options.routing || 'fanout',
                     exchangeOptions)
      .then(function(ok) {
        return ch.bindQueue(queue, source, topic);
      })
      .then(callback);
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions