Hi all.<div>First of all, thanks for rabbitmq team &amp; community. With rabbitmq, our production environment has been improving.</div><div>I am very pleased if you help me.�</div><div><br></div><div>*Environment*</div><div>
<br></div><div><div>1. rabbit-mq 2.8.4(and java client 2.8.4), spring-amqp 1.1.0, spring-rabbit 1.1.0.</div><div>2. erlang RB15B01</div><div><br></div></div><div>*Problem*</div><div><br></div><div>1. When I declared mirrored queues using spring-rabbit API, one of them is sometimes failed.</div>
<div>2. As a result, the failed queue(s) does not exist.</div><div>3. When I rerun my code without any changes, it is sometimes success.</div><div>4. Code for declaring the queues�is as following.</div><div><br></div><div>
<div><i>&lt;bean id=&quot;notificationAddCommentQueue&quot; class=&quot;org.springframework.amqp.core.Queue&quot;&gt;</i></div><div><i><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;constructor-arg name=&quot;name&quot; value=&quot;cafe.notification.addComment&quot; /&gt;</i></div>
<div><i><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;constructor-arg name=&quot;autoDelete&quot; value=&quot;false&quot; /&gt;</i></div><div><i><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;constructor-arg name=&quot;exclusive&quot; value=&quot;false&quot; /&gt;</i></div>
<div><i><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;constructor-arg name=&quot;durable&quot; value=&quot;true&quot; /&gt;</i></div><div><i><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;constructor-arg name=&quot;arguments&quot;&gt;</i></div>
<div><i><span class="Apple-tab-span" style="white-space:pre">                </span>&lt;map&gt;</i></div><div><i><span class="Apple-tab-span" style="white-space:pre">                        </span>&lt;entry key=&quot;x-ha-policy&quot; value=&quot;all&quot; /&gt;</i></div>
<div><i><span class="Apple-tab-span" style="white-space:pre">                </span>&lt;/map&gt;</i></div><div><i><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;/constructor-arg&gt;</i></div><div><i>&lt;/bean&gt;</i></div>
</div><div><i><br></i></div><div><i>...</i></div><div><br></div><div><i>for (Queue queue : queues) {</i></div><div><div><i>� rabbitAdmin.deleteQueue(queue.getName());</i></div><div><i>� rabbitAdmin.declareQueue(queue);</i></div>
<div><i>}</i></div></div><div><br></div><div>5. Error logs on rabbitmq-server is as following.</div><div><br></div><div><i>=INFO REPORT==== 14-Aug-2012::16:32:05 ===</i></div><div><div><i>Mirrored-queue (queue &#39;cafe.ping&#39; in vhost &#39;cafe&#39;): Promoting slave &lt;mq1@NVCAFMQ1501.3.853.2&gt; to master</i></div>
<div><i><br></i></div><div><i>=ERROR REPORT==== 14-Aug-2012::16:32:06 ===</i></div><div><i>** Generic server &lt;0.854.2&gt; terminating</i></div><div><i>** Last message in was {&#39;$gen_cast&#39;,</i></div><div><i>� � � � � � � � � � � � {broadcast,</i></div>
<div><i>� � � � � � � � � � � � �{delete_and_terminate,</i></div><div><i>� � � � � � � � � � � � � {{case_clause,{error,not_found}},</i></div><div><i>� � � � � � � � � � � � � �[{rabbit_amqqueue_process,i,2,[]},</i></div>
<div><i>� � � � � � � � � � � � � � {rabbit_amqqueue_process,&#39;-infos/2-lc$^0/1-0-&#39;,2,</i></div><div><i>� � � � � � � � � � � � � � �[]},</i></div><div><i>� � � � � � � � � � � � � � {rabbit_amqqueue_process,&#39;-infos/2-lc$^0/1-0-&#39;,2,</i></div>
<div><i>� � � � � � � � � � � � � � �[]},</i></div><div><i>� � � � � � � � � � � � � � {rabbit_amqqueue_process,infos,2,[]},</i></div><div><i>� � � � � � � � � � � � � � {rabbit_amqqueue_process,emit_stats,2,[]},</i></div>
<div><i>� � � � � � � � � � � � � � {rabbit_event,if_enabled,3,[]},</i></div><div><i>� � � � � � � � � � � � � � {rabbit_amqqueue_process,handle_pre_hibernate,1,</i></div><div><i>� � � � � � � � � � � � � � �[]},</i></div>
<div><i>� � � � � � � � � � � � � � {gen_server2,pre_hibernate,1,[]}]}}}}</i></div><div><i>** When Server state == {state,</i></div><div><i>� � � � � � � � � � � � � � {4,&lt;0.854.2&gt;},</i></div><div><i>� � � � � � � � � � � � � � {{4,&lt;0.854.2&gt;},undefined},</i></div>
<div><i>� � � � � � � � � � � � � � {{4,&lt;0.854.2&gt;},undefined},</i></div><div><i>� � � � � � � � � � � � � � {resource,&lt;&lt;&quot;cafe&quot;&gt;&gt;,queue,&lt;&lt;&quot;cafe.ping&quot;&gt;&gt;},</i></div><div><i>� � � � � � � � � � � � � � rabbit_mirror_queue_coordinator,</i></div>
<div><i>� � � � � � � � � � � � � � {9,</i></div><div><i>� � � � � � � � � � � � � � �[{{4,&lt;0.854.2&gt;},</i></div><div><i>� � � � � � � � � � � � � � � �{view_member,</i></div><div><i>� � � � � � � � � � � � � � � � � �{4,&lt;0.854.2&gt;},</i></div>
<div><i>� � � � � � � � � � � � � � � � � �[],</i></div><div><i>� � � � � � � � � � � � � � � � � �{4,&lt;0.854.2&gt;},</i></div><div><i>� � � � � � � � � � � � � � � � � �{4,&lt;0.854.2&gt;}}}]},</i></div><div><i>� � � � � � � � � � � � � � 4,[],</i></div>
<div><i>� � � � � � � � � � � � � � [&lt;0.855.2&gt;],</i></div><div><i>� � � � � � � � � � � � � � {[],[]},</i></div><div><i>� � � � � � � � � � � � � � [],undefined}</i></div><div><i>** Reason for termination ==�</i></div>
<div><i>** {{case_clause,{error,not_found}},</i></div><div><i>� � [{rabbit_amqqueue_process,i,2,[]},</i></div><div><i>� � �{rabbit_amqqueue_process,&#39;-infos/2-lc$^0/1-0-&#39;,2,[]},</i></div><div><i>� � �{rabbit_amqqueue_process,&#39;-infos/2-lc$^0/1-0-&#39;,2,[]},</i></div>
<div><i>� � �{rabbit_amqqueue_process,infos,2,[]},</i></div><div><i>� � �{rabbit_amqqueue_process,emit_stats,2,[]},</i></div><div><i>� � �{rabbit_event,if_enabled,3,[]},</i></div><div><i>� � �{rabbit_amqqueue_process,handle_pre_hibernate,1,[]},</i></div>
<div><i>� � �{gen_server2,pre_hibernate,1,[]}]}</i></div></div><div><br></div><div><br></div><div><div>� � � � � � � � � � � � � � � � �[{file,&quot;proc_lib.erl&quot;},{line,227}]}]}}</div><div>** When Server state == {q,</div>
<div>� � � � � � � � � � � � �{amqqueue,</div><div>� � � � � � � � � � � � � {resource,&lt;&lt;&quot;cafe&quot;&gt;&gt;,queue,&lt;&lt;&quot;cafe.ping&quot;&gt;&gt;},</div><div>� � � � � � � � � � � � � true,false,none,</div>
<div>� � � � � � � � � � � � � [{&lt;&lt;&quot;x-ha-policy&quot;&gt;&gt;,longstr,&lt;&lt;&quot;all&quot;&gt;&gt;}],</div><div>� � � � � � � � � � � � � &lt;0.22597.1&gt;,[],all},</div><div>� � � � � � � � � � � � �none,false,rabbit_mirror_queue_master,</div>
<div>� � � � � � � � � � � � �{state,&lt;0.22598.1&gt;,&lt;0.22781.1&gt;,</div><div>� � � � � � � � � � � � � rabbit_variable_queue,</div><div>� � � � � � � � � � � � � {vqstate,</div><div>� � � � � � � � � � � � � �{0,{[],[]}},</div>
<div>� � � � � � � � � � � � � �{0,{[],[]}},</div><div>� � � � � � � � � � � � � �{delta,undefined,0,undefined},</div><div>� � � � � � � � � � � � � �{0,{[],[]}},</div><div>� � � � � � � � � � � � � �{1,</div><div>� � � � � � � � � � � � � � {[{msg_status,0,</div>
<div>� � � � � � � � � � � � � � � �&lt;&lt;176,245,83,92,212,158,235,71,163,59,227,246,</div><div>� � � � � � � � � � � � � � � � �180,233,129,198&gt;&gt;,</div><div>� � � � � � � � � � � � � � � �{basic_message,</div><div>
� � � � � � � � � � � � � � � � {resource,&lt;&lt;&quot;cafe&quot;&gt;&gt;,exchange,&lt;&lt;&quot;cafe.ping&quot;&gt;&gt;},</div><div>� � � � � � � � � � � � � � � � [&lt;&lt;&quot;cafe.ping&quot;&gt;&gt;],</div><div>� � � � � � � � � � � � � � � � {content,60,</div>
<div>� � � � � � � � � � � � � � � � �{&#39;P_basic&#39;,&lt;&lt;&quot;application/json&quot;&gt;&gt;,</div><div>� � � � � � � � � � � � � � � � � &lt;&lt;&quot;UTF-8&quot;&gt;&gt;,</div><div>� � � � � � � � � � � � � � � � � [{&lt;&lt;&quot;__TypeId__&quot;&gt;&gt;,longstr,</div>
<div>� � � � � � � � � � � � � � � � � � &lt;&lt;&quot;java.lang.String&quot;&gt;&gt;}],</div><div>� � � � � � � � � � � � � � � � � 2,0,undefined,undefined,undefined,undefined,</div><div>� � � � � � � � � � � � � � � � � undefined,undefined,undefined,undefined,</div>
<div>� � � � � � � � � � � � � � � � � undefined},</div><div>� � � � � � � � � � � � � � � � �&lt;&lt;248,0,16,97,112,112,108,105,99,97,116,105,</div><div>� � � � � � � � � � � � � � � � � �111,110,47,106,115,111,110,5,85,84,70,45,56,</div>
<div>� � � � � � � � � � � � � � � � � �0,0,0,32,10,95,95,84,121,112,101,73,100,95,</div><div>� � � � � � � � � � � � � � � � � �95,83,0,0,0,16,106,97,118,97,46,108,97,110,</div><div>� � � � � � � � � � � � � � � � � �103,46,83,116,114,105,110,103,2,0&gt;&gt;,</div>
<div>� � � � � � � � � � � � � � � � �rabbit_framing_amqp_0_9_1,</div><div>� � � � � � � � � � � � � � � � �[&lt;&lt;&quot;\&quot;NVCAFBE1501.nhnjp.ism cafe-api-server : Tue Aug 14 16:32:03 JST 2012\&quot;&quot;&gt;&gt;]},</div>
<div>� � � � � � � � � � � � � � � � &lt;&lt;176,245,83,92,212,158,235,71,163,59,227,246,</div><div>� � � � � � � � � � � � � � � � � 180,233,129,198&gt;&gt;,</div><div>� � � � � � � � � � � � � � � � true},</div><div>� � � � � � � � � � � � � � � �true,false,true,true,</div>
<div>� � � � � � � � � � � � � � � �{message_properties,undefined,false}}],</div><div>� � � � � � � � � � � � � � �[]}},</div><div>� � � � � � � � � � � � � �1,</div><div>� � � � � � � � � � � � � �{0,nil},</div><div>� � � � � � � � � � � � � �undefined,</div>
<div>� � � � � � � � � � � � � �{0,nil},</div><div>� � � � � � � � � � � � � �{qistate,</div><div>� � � � � � � � � � � � � � &quot;/home/www/rabbitmq_server-2.8.4/sbin/../var/lib/rabbitmq/mnesia/mq2/queues/9QF3UUJUE12OVYVA26GQJ1FFU&quot;,</div>
<div>� � � � � � � � � � � � � � {{dict,0,16,16,8,80,48,</div><div>� � � � � � � � � � � � � � � {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],</div><div>� � � � � � � � � � � � � � � �[]},</div><div>� � � � � � � � � � � � � � � {{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],</div>
</div><div><br></div><div>...</div><div><br></div><div><br></div><div><br clear="all"><div><br></div>-- <br>Min Cha, Software Developer<br><br>Projects involved<div>- CoRepository :�<a href="https://github.com/MinCha/corepository" target="_blank">https://github.com/MinCha/corepository</a><br>
- Good-Samples :�<a href="http://code.google.com/p/good-samples/" target="_blank">http://code.google.com/p/good-samples/</a><br><br><div>Blog<br>- (Eng) <a href="http://minslovey.blogspot.com" target="_blank">http://minslovey.blogspot.com</a><br>
- (Kor) <a href="http://minslovey.tistory.com" target="_blank">http://minslovey.tistory.com</a></div></div><br>
</div>