<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:85.05pt 56.7pt 85.05pt 56.7pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DA link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Hi ,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Am experiencing trouble when configuring alternate exchange for my broker. I am following the docs present in rabbitmq site. The error am getting is<br><br><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>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,""}<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> at com.rabbitmq.client.impl.ChannelN.processAsync(ChannelN.java:230)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> at com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:165)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:110)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:437)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Caught: com.rabbitmq.client.AlreadyClosedException: clean connection shutdown; reason: Attempt to use closed channel<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>As you can see in the Stack Trace, am defining alternate exchange and looks like it does not like it. This is my rfrence from RabbitMQ Site<br><br>Map<String, Object> args = new HashMap<String, Object>();<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>args.put("alternate-exchange", "my-ae");<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>channel.exchangeDeclare("my-direct", "direct", false, false, args);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>channel.exchangeDeclare("my-ae", "fanout");<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>channel.queueDeclare("routed");<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>channel.queueBind("routed", "my-direct", "key1");<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>channel.queueDeclare("unrouted");<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>channel.queueBind("unrouted", "my-ae", "");<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Regds<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Prashant <o:p></o:p></span></p></div></body></html>