Skip to content
This repository

alternate-exchange exchange option #131

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

2 participants

Patrick de Lanauze David Barshow
Patrick de Lanauze

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) {
David Barshow

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) {
Patrick de Lanauze

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

David Barshow

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
Something went wrong with that request. Please try again.