[rabbitmq-discuss] Alternate Exchange Configuration Issue
Prashant
prayadav at gmail.com
Tue Jan 25 13:30:23 GMT 2011
Hi ,
the snippet you see is what I was referring to( from rabbitMQ site). I
have defined an exchange called 'exchange' and declared it with
arguments as in the code snippet.(groovy)
exchangeName = 'exchange'; queueName = 'myQueue'
args = new HashMap<String,Object>()
args.put("alternate-exchange", "my-ae")
channel.exchangeDeclare exchangeName, 'direct',false,false,args
channel.exchangeDeclare "my-ae", "fanout"
channel.queueDeclare "unrouted",false,false,false,null
channel.queueDeclare queueName,false,false,false,null
channel.queueBind "unrouted" , "my-ae" , ""
channel.queueBind queueName, exchangeName, 'rKey'
Regds
Prashant
On Jan 24, 7:55 pm, Simon MacMullen <si... at rabbitmq.com> wrote:
> On 24/01/2011 7:33PM, Prashant Yadav wrote:
> > Am experiencing trouble when configuring alternate exchange for my
> > broker. I am following the docs present in rabbitmq site. The error am
> > getting is
> >
> > Caused by: com.rabbitmq.client.ShutdownSignalException: channel error;
> > reason:
> > {#method<channel.close>(reply-code=406,reply-text=PRECONDITION_FAILED -
> > inequivalent arg 'alternate-exchange' for exchange 'exchange' in vhost
> > '/': required {longstr,<<97,101>>}, received
> > undefined,class-id=40,method-id=10),null,""}
>
> Did you previously declare the exchange with a different alternate
> exchange? (Or none?) Every declaration of an exchange needs to have the
> same arguments.
>
> BTW I note that your error message references an exchange called
> "exchange" but your code references "my-direct".
>
> Cheers, Simon
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-disc... at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
More information about the rabbitmq-discuss
mailing list