<div dir="ltr">thank you very much!<img src="cid:332@goomoji.gmail" style="margin-top: 0px; margin-right: 0.2ex; margin-bottom: 0px; margin-left: 0.2ex; vertical-align: middle; " goomoji="332"></div><div class="gmail_extra">
<br><br><div class="gmail_quote">2013/5/30 Emile Joubert <span dir="ltr">&lt;<a href="mailto:emile@rabbitmq.com" target="_blank">emile@rabbitmq.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
Hi,<br>
<div class="im"><br>
On 27/05/13 16:12, bupt bupt wrote:<br>
&gt; 1. Can you give me an example(internet address is ok) about how to<br>
&gt; finish flow control if the length of queue is too big or if the used<br>
&gt; memory and disc near the threshold. Can you give me some client<br>
&gt; code(python or Java) to help me use it.<br>
<br>
</div>If I understand correctly you have a broker with disk free space close<br>
to the disk free limit or memory use close to the high watermark, and<br>
you want to disable resource flow control.<br>
<br>
You should be aware that disabling resource flow control will make the<br>
broker more likely to run out of resources and crash. A better solution<br>
is to provision the broker with more resources. You should only relax<br>
the resource limits if your application can tolerate the increased risk<br>
of a crashing broker.<br>
<br>
You can relax memory flow control by increasing the memory high<br>
watermark from 40% to 50% or higher, e.g.<br>
<br>
�rabbitmqctl set_vm_memory_high_watermark 0.5<br>
<br>
Setting it to an infeasibly large ration effectively disables memory<br>
flow control:<br>
<br>
�rabbitmqctl set_vm_memory_high_watermark 100.0<br>
<br>
These instructions will change the limits for a running broker. See the<br>
instructions here for how to make the changes permanent by changing the<br>
configuration file: <a href="http://www.rabbitmq.com/memory.html#memsup" target="_blank">http://www.rabbitmq.com/memory.html#memsup</a><br>
<br>
<br>
You can reduce the disk free limit by specifying a lower limit:<br>
<br>
�rabbitmqctl eval &#39;rabbit_disk_monitor:set_disk_free_limit(500000000).&#39;<br>
<br>
or disable it by setting the limit to zero:<br>
<br>
�rabbitmqctl eval &#39;rabbit_disk_monitor:set_disk_free_limit(0).&#39;<br>
<br>
See <a href="http://www.rabbitmq.com/memory.html#diskfreesup" target="_blank">http://www.rabbitmq.com/memory.html#diskfreesup</a> for persisting the<br>
change in the configuration file.<br>
<div class="im"><br>
<br>
&gt; 2. I have read document about how to set up rabbitmq cluster<br>
&gt; by&quot;<a href="http://www.rabbitmq.com/clustering.html" target="_blank">http://www.rabbitmq.com/clustering.html</a>&quot; But who is master and who is<br>
&gt; cluster, It �doesn&#39;t tell us. which broker manage all the nodes in<br>
&gt; cluster? I didn&#39;t see any mirror queue in this address, Can this cluster<br>
&gt; still be HA cluster?<br>
<br>
</div>There is no global master. Queues can have different policies, so there<br>
is a master node per queue (assuming the queue is mirrored). See the<br>
&quot;rabbitmqctl list_queues&quot; documentation for querying the master and<br>
slave nodes for queues:<br>
<br>
<a href="http://www.rabbitmq.com/man/rabbitmqctl.1.man.html" target="_blank">http://www.rabbitmq.com/man/rabbitmqctl.1.man.html</a><br>
<div class="im"><br>
&gt; 3. Is every message has length and size limit? what is the maximum size<br>
&gt; of every message?<br>
<br>
<br>
</div>Messages can be as large as you like, but they should not consume a<br>
significant fraction of total available RAM. If you want to process<br>
extremely large messages then you need alot of RAM.<br>
<br>
Queue length can be limited with the x-max-length argument. See<br>
<a href="http://www.rabbitmq.com/maxlength.html" target="_blank">http://www.rabbitmq.com/maxlength.html</a>.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
<br>
-Emile<br>
<br>
<br>
<br>
<br>
</font></span></blockquote></div><br></div>