[rabbitmq-discuss] problem about flow control and HA cluster

Emile Joubert emile at rabbitmq.com
Thu May 30 10:31:30 BST 2013


On 27/05/13 16:12, bupt bupt wrote:
> 1. Can you give me an example(internet address is ok) about how to
> finish flow control if the length of queue is too big or if the used
> memory and disc near the threshold. Can you give me some client
> code(python or Java) to help me use it.

If I understand correctly you have a broker with disk free space close
to the disk free limit or memory use close to the high watermark, and
you want to disable resource flow control.

You should be aware that disabling resource flow control will make the
broker more likely to run out of resources and crash. A better solution
is to provision the broker with more resources. You should only relax
the resource limits if your application can tolerate the increased risk
of a crashing broker.

You can relax memory flow control by increasing the memory high
watermark from 40% to 50% or higher, e.g.

 rabbitmqctl set_vm_memory_high_watermark 0.5

Setting it to an infeasibly large ration effectively disables memory
flow control:

 rabbitmqctl set_vm_memory_high_watermark 100.0

These instructions will change the limits for a running broker. See the
instructions here for how to make the changes permanent by changing the
configuration file: http://www.rabbitmq.com/memory.html#memsup

You can reduce the disk free limit by specifying a lower limit:

 rabbitmqctl eval 'rabbit_disk_monitor:set_disk_free_limit(500000000).'

or disable it by setting the limit to zero:

 rabbitmqctl eval 'rabbit_disk_monitor:set_disk_free_limit(0).'

See http://www.rabbitmq.com/memory.html#diskfreesup for persisting the
change in the configuration file.

> 2. I have read document about how to set up rabbitmq cluster
> by"http://www.rabbitmq.com/clustering.html" But who is master and who is
> cluster, It  doesn't tell us. which broker manage all the nodes in
> cluster? I didn't see any mirror queue in this address, Can this cluster
> still be HA cluster?

There is no global master. Queues can have different policies, so there
is a master node per queue (assuming the queue is mirrored). See the
"rabbitmqctl list_queues" documentation for querying the master and
slave nodes for queues:


> 3. Is every message has length and size limit? what is the maximum size
> of every message?

Messages can be as large as you like, but they should not consume a
significant fraction of total available RAM. If you want to process
extremely large messages then you need alot of RAM.

Queue length can be limited with the x-max-length argument. See


More information about the rabbitmq-discuss mailing list