<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=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","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;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:EN-GB;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Calibri","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoPlainText>Thanks to all you help guys.<o:p></o:p></p><p class=MsoPlainText>Actually I screwed up - I didn’t <b>need</b> to declare a queue in my Spring Application Context if the queue was already declared on the Rabbit-MQ server.<o:p></o:p></p><p class=MsoPlainText>Am new to Rabbit, don't bash me :)<o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";mso-fareast-language:EN-US'>Thanks<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";mso-fareast-language:EN-US'>Nadeem<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> rabbitmq-discuss-bounces@lists.rabbitmq.com [mailto:rabbitmq-discuss-bounces@lists.rabbitmq.com] <b>On Behalf Of </b>Matthias Reik<br><b>Sent:</b> 31 August 2012 23:03<br><b>To:</b> Discussions about RabbitMQ<br><b>Subject:</b> Re: [rabbitmq-discuss] rabbitmq - simple message sending error<o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'>Or to put it more simple:<br>If you already have a queue, and you try to declare it again (which is ok), you will have to make sure that you declare it with the same parameters. As your stack trace shows, and as Mark mentions, in your case the x-message-ttl is the parameter that differs.<br><br>I want to take to use the occasion to ask a question in this context:<br>For most of the parameters this is a good approach, but for some parameters this can be a bit annoying, especially for the HA feature, where you specify over which servers a queue is distributed. For the TTL it's a bit similar<br>At least I feel sometimes that it would be good if the queue parameters could be adjusted at runtime, that the mirroring could be changed at runtime, without clients requiring an update.<br>The current approach we have taken is that clients don't define the queues anymore, but they are managed externally. Which is not ideal either :-( If anyone has a good recommendation, ideas, ... I would be interested to hear them<br><br>Cheers<br>Maze<br><br><o:p></o:p></p><div><p class=MsoNormal>On Fri, Aug 31, 2012 at 7:15 PM, Mark Fisher &lt;<a href="mailto:markfisher@vmware.com" target="_blank">markfisher@vmware.com</a>&gt; wrote:<o:p></o:p></p><div><div><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-family:"Arial","sans-serif"'>The error message is showing that you are trying to declare a Queue where the value for 'x-message-ttl' does not match that of an existing Queue with the same name ('</span><span style='font-family:"Helvetica","sans-serif"'>ml2gos_events')</span><span style='font-family:"Arial","sans-serif"'>.<o:p></o:p></span></p><div class=MsoNormal align=center style='text-align:center'><span style='font-family:"Arial","sans-serif"'><hr size=2 width="100%" align=center></span></div><blockquote style='border:none;border-left:solid #1010FF 1.5pt;padding:0cm 0cm 0cm 4.0pt;margin-left:3.75pt;margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><b><span style='font-family:"Helvetica","sans-serif"'>From: </span></b><span style='font-family:"Helvetica","sans-serif"'>&quot;Nadeem M Nayeck&quot; &lt;<a href="mailto:nadeem.m.nayeck@gmail.com" target="_blank">nadeem.m.nayeck@gmail.com</a>&gt;<br><b>To: </b>&quot;Discussions about RabbitMQ&quot; &lt;<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.rabbitmq.com</a>&gt;<br><b>Sent: </b>Friday, August 31, 2012 12:57:51 PM<br><b>Subject: </b>[rabbitmq-discuss] &nbsp;rabbitmq - simple message sending error<o:p></o:p></span></p><div><div><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-family:"Helvetica","sans-serif"'><br><br>hi guys<br>I wrote a simple java client&nbsp; sending a message to a queue on Rabbit<br>I get this:<br><br><br>org.springframework.amqp.rabbit.connection.CachingConnectionFactory$CachedChannelInvocationHandler.invoke(CachingConnectionFactory.java:331)<br>&nbsp;&nbsp;&nbsp; at $Proxy9.queueDeclare(Unknown Source)<br>&nbsp;&nbsp;&nbsp; at org.springframework.amqp.rabbit.core.RabbitAdmin.declareQueues(RabbitAdmin.java:342)<br>&nbsp;&nbsp;&nbsp; at org.springframework.amqp.rabbit.core.RabbitAdmin.access$200(RabbitAdmin.java:46)<br>&nbsp;&nbsp;&nbsp; at org.springframework.amqp.rabbit.core.RabbitAdmin$11.doInRabbit(RabbitAdmin.java:312)<br>&nbsp;&nbsp;&nbsp; at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:600)<br>&nbsp;&nbsp;&nbsp; ... 41 more<br>Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; reason: {#method&lt;channel.close&gt;(reply-code=406, reply-text=PRECONDITION_FAILED - inequivalent arg 'x-message-ttl'for queue 'ml2gos_events' in vhost 'OPLCPMED00': received none but current is the value '86400000' of type 'long', class-id=50, method-id=10), null, &quot;&quot;}<br>&nbsp;&nbsp;&nbsp; at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:67)<br>&nbsp;&nbsp;&nbsp; at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:33)<br>&nbsp;&nbsp;&nbsp; at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:343)<br>&nbsp;&nbsp;&nbsp; at com.rabbitmq.client.impl.AMQChannel.privateRpc(AMQChannel.java:216)<br>&nbsp;&nbsp;&nbsp; at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:118)<br>&nbsp;&nbsp;&nbsp; ... 53 more<br>Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; reason: {#method&lt;channel.close&gt;(reply-code=406, reply-text=PRECONDITION_FAILED - inequivalent arg 'x-message-ttl'for queue 'ml2gos_events' in vhost 'OPLCPMED00': received none but current is the value '86400000' of type 'long', class-id=50, method-id=10), null, &quot;&quot;}<br>&nbsp;&nbsp;&nbsp; at com.rabbitmq.client.impl.ChannelN.asyncShutdown(ChannelN.java:454)<br>&nbsp;&nbsp;&nbsp; at com.rabbitmq.client.impl.ChannelN.processAsync(ChannelN.java:294)<br>&nbsp;&nbsp;&nbsp; at com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:144)<br>&nbsp;&nbsp;&nbsp; at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:91)<br>&nbsp;&nbsp;&nbsp; at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:519)<br><br><br><br>Any pointers?<br><br>regards,<br>Nadeem<o:p></o:p></span></p></div></div><p class=MsoNormal><span style='font-family:"Helvetica","sans-serif"'>_______________________________________________<br>rabbitmq-discuss mailing list<br><a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.rabbitmq.com</a><br><a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><o:p></o:p></span></p></blockquote><p class=MsoNormal><span style='font-family:"Arial","sans-serif"'><o:p>&nbsp;</o:p></span></p></div></div><p class=MsoNormal style='margin-bottom:12.0pt'><br>_______________________________________________<br>rabbitmq-discuss mailing list<br><a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br><a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><o:p></o:p></p></div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></body></html>