[rabbitmq-discuss] rabbit is out of service in disk mode.

Emile Joubert emile at rabbitmq.com
Tue Jul 6 12:37:35 BST 2010

Hi 张明涛,

Regardless of whether messages are published as persistent, all messages
are held in RAM. If you publish messages without consuming them them you
will eventually run out of RAM. Your server seems to have enough memory
for 9000 messages.

You will not be able to open any new channels to the broker after the
memory limit has been reached, but existing consumers may continue to
consume messages.

The source repository currently contains a new persister in branch
(bug21673) which will solve your problem. This feature is currently
undergoing QA.

The memory high-watermark is somewhat relevant to your situation. This
can be set in the config file (see
http://www.rabbitmq.com/install.html). The default of 40% is recommended.



On 06/07/10 09:39, 张明涛 wrote:
> I send messages(size:10kB) to a queue on single node,but with no
> consumers. Here is my java code:
>   channel.exchangeDeclare(exec, "direct", true, false, null);
>   channel.queueDeclare("FirstQueue", true, false, false, null);
>   channel.queueBind(queueName, exec, routingKey);
>   BasicProperties bp = new BasicProperties();
>   bp.setDeliveryMode(2);
>   channel.basicPublish(exec, routingKey, bp, messageBodyBytes);
>   When 9000 message sent, the producer was blocked, I got a message in log :
>   vm_memory_high_watermark set. Memory used:288650128 allowed:211065241
>   alarm_handler: {set,{vm_memory_high_watermark,[]}}
>   Then I stop the rabbit,restart it, but I got same messages in log .
>   If I start a consumer,it receives no messages either。
>   Anyone knows how many messages can a queue persist? just 9000 ?
>   I want to persist all the messages, is it possible?
>   Anyone give me some advice? Thks .

More information about the rabbitmq-discuss mailing list