[rabbitmq-discuss] flow control in rabbitmq

sandeep kumar sandy.sandeeep at gmail.com
Tue Jan 7 06:09:10 GMT 2014


i have tried again the scenario 1 as mentioned in earlier post and i have
seen loss of messages by running the following scenario.

Code of sender and recevier is taken from here
http://www.rabbitmq.com/tutorials/tutorial-one-java.html

1) I have set the the vm memory high watermark as 0.0 using sudo
rabbitmqctl set_vm_memory_high_watermark 0.0
and this was the rabbitmq status

[{pid,18011},
 {running_applications,[{rabbit,"RabbitMQ","3.2.0"},
                        {os_mon,"CPO  CXC 138 46","2.2.7"},
                        {xmerl,"XML parser","1.2.10"},
                        {mnesia,"MNESIA  CXC 138 12","4.5"},
                        {sasl,"SASL  CXC 138 11","2.1.10"},
                        {stdlib,"ERTS  CXC 138 10","1.17.5"},
                        {kernel,"ERTS  CXC 138 10","2.14.5"}]},
 {os,{unix,linux}},
 {erlang_version,"Erlang R14B04 (erts-5.8.5) [source] [smp:4:4] [rq:4]
[async-threads:30] [kernel-poll:true]\n"},
 {memory,[{total,36566880},
          {connection_procs,4412},
          {queue_procs,7584},
          {plugins,0},
          {other_proc,4730524},
          {mnesia,30868},
          {mgmt_db,0},
          {msg_index,3304196},
          {other_ets,14336920},
          {binary,4477424},
          {code,7676827},
          {atom,907549},
          {other_system,1090576}]},
 {vm_memory_high_watermark,0.0},
 {vm_memory_limit,0},
 {disk_free_limit,10180000000},
 {disk_free,12359700480},
 {file_descriptors,[{total_limit,924},
                    {total_used,4},
                    {sockets_limit,829},
                    {sockets_used,1}]},
 {processes,[{limit,1048576},{used,127}]},
 {run_queue,0},
 {uptime,454}]

2) Now i sent messages to the queue in a loop of 100000
but i could see publish messages successful till 1435 and then publish( )
gets blocked.
i have stopped the sender now.
i have run listqueues command and i could see 0 messages in the queue

3) I have set the the vm memory high watermark as 0.4 using sudo
rabbitmqctl set_vm_memory_high_watermark 0.4

4) i have run listqueues command again expecting the 1435 messages
but i have seen 0 messages in queue.
and now i have run receiver but no received message in the log.


and this was the rabbitmq status

[{pid,18011},
 {running_applications,[{rabbit,"RabbitMQ","3.2.0"},
                        {os_mon,"CPO  CXC 138 46","2.2.7"},
                        {xmerl,"XML parser","1.2.10"},
                        {mnesia,"MNESIA  CXC 138 12","4.5"},
                        {sasl,"SASL  CXC 138 11","2.1.10"},
                        {stdlib,"ERTS  CXC 138 10","1.17.5"},
                        {kernel,"ERTS  CXC 138 10","2.14.5"}]},
 {os,{unix,linux}},
 {erlang_version,"Erlang R14B04 (erts-5.8.5) [source] [smp:4:4] [rq:4]
[async-threads:30] [kernel-poll:true]\n"},
 {memory,[{total,134642952},
          {connection_procs,5920},
          {queue_procs,80505068},
          {plugins,0},
          {other_proc,4761592},
          {mnesia,30868},
          {mgmt_db,0},
          {msg_index,3304196},
          {other_ets,14336920},
          {binary,22022520},
          {code,7676827},
          {atom,907549},
          {other_system,1091492}]},
 {vm_memory_high_watermark,0.4},
 {vm_memory_limit,1650614272},
 {disk_free_limit,10180000000},
 {disk_free,12359540736},
 {file_descriptors,[{total_limit,924},
                    {total_used,4},
                    {sockets_limit,829},
                    {sockets_used,1}]},
 {processes,[{limit,1048576},{used,127}]},
 {run_queue,0},
 {uptime,702}]
...done.


On Mon, Dec 30, 2013 at 3:33 PM, sandeep kumar <sandy.sandeeep at gmail.com>wrote:

> Hi ,
>
> I have used single rabbitmq node , And I set  memory_high_watermark to a
> small value(0.05)
> and messages are being sent to the rabbitmq node at a higher rate.
> When memory is about to be breached because of higher rate of messages to
> the node creation of .rdq files is observed.
> when the memory consumtion crosses the limit all connections to the node
> getting blocked is observed.
> At this point of time there is neither increase in queue size nor .rdq
> size, but publish to queue statemt is getting executed.
>
> Questions are :
>
> where are the published messages are getting store when connections to
> queue are in blocked state
>
> how to handle this kind of scenario gracefully
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140107/be1018a9/attachment.html>


More information about the rabbitmq-discuss mailing list