alternate-exchange exchange option #131

Open
pdelanauze opened this Issue Sep 25, 2012 · 3 comments

Projects

None yet

2 participants

@pdelanauze

I need to connect to an exchange requiring 'alternate-exchange': 'unknown', which i try and set in the options along the type: 'topic' option, but it doesn't seem to pick it up.

I'm seeing:

Error: PRECONDITION_FAILED - inequivalent arg 'alternate-exchange'for exchange 'transform' in vhost '/': received none but current is the value 'unknown' of type 'longstr'

Here's how i setup my exchange:

amqp.exchange('transform', {
      type:'topic',
      durable:true,
      'alternate-exchange': 'unknown'
    }, function (exchange) {

Passing in the parameter in an arguments object like below does not work either ...

amqp.exchange('transform', {
      type:'topic',
      durable:true,
      'arguments': {
        'alternate-exchange': 'unknown'
      }
    }, function (exchange) {
@barshow
barshow commented Sep 26, 2012

the second way you specified is correct. Below should work if you ae is actually called unknown

amqp.exchange('transform', {
      type:'topic',
      durable:true,
      arguments: {
        'alternate-exchange': 'unknown'
      }
    }, function (exchange) {
@pdelanauze

I'll give it another shot but the second way did not work for me yesterday

@barshow
barshow commented Sep 26, 2012

Im using it in production and its working, are you using the npm version pulling from master here on the github? We're using master here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment