<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>&nbsp;</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&lt;channel.close&gt;(reply-code=406,reply-text=PRECONDITION_FAILED - inequivalent arg 'alternate-exchange' for exchange 'exchange' in vhost '/':&nbsp; required {longstr,&lt;&lt;97,101&gt;&gt;}, received undefined,class-id=40,method-id=10),null,&quot;&quot;}<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.rabbitmq.client.impl.ChannelN.processAsync(ChannelN.java:230)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:165)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:110)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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>&nbsp;</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&lt;String, Object&gt; args = new HashMap&lt;String, Object&gt;();<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>args.put(&quot;alternate-exchange&quot;, &quot;my-ae&quot;);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>channel.exchangeDeclare(&quot;my-direct&quot;, &quot;direct&quot;, false, false, args);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>channel.exchangeDeclare(&quot;my-ae&quot;, &quot;fanout&quot;);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>channel.queueDeclare(&quot;routed&quot;);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>channel.queueBind(&quot;routed&quot;, &quot;my-direct&quot;, &quot;key1&quot;);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>channel.queueDeclare(&quot;unrouted&quot;);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>channel.queueBind(&quot;unrouted&quot;, &quot;my-ae&quot;, &quot;&quot;);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</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 &nbsp;<o:p></o:p></span></p></div></body></html>