[rabbitmq-discuss] Problem when enqueuing with no delay

Pablo Briongos pablo.briongos at ific.uv.es
Wed Sep 11 10:27:52 BST 2013


Hi all,

I'm testing RabbitMQ AMQP with amqp-ruby library client. The scenario is 
1 or 2 producers sending little messages from about 50 KB to one queue 
(the idea is increase this amount of KB)  and various consumers.

The problem comes when there's no delay when producer is enqueuing 
messages, this is the basic code (where variable /productor_time/ is the 
time between enqueuing messages):

[...]
               EventMachine.add_periodic_timer( productor_time ) do
                     exchange.publish message, :routing_key => "queue0", 
:persistent => (true)
                     progress(1)
              end
[...]

When /productor_time/ is 0, it seems that there is a collapse in a 
moment, and publishers are enqueuing messages but consumers don't 
dequeue message and so the RAM memory and SWAP memory increase to the 
crash of the machine. If /productor_time/ is more than 0, for example 
0.1, there's no problem and consumers dequeue messages normally.


The code for consumer:

            queue.subscribe(:ack => true) do |header, message|
                 messages << message
                 header.ack
                 progress(1)
            end


If I try with ruby-STOMP interface this problem is not present.

Do you know what is happening here?

Thanks

Cheers,

Pablo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130911/b5af9a64/attachment.htm>


More information about the rabbitmq-discuss mailing list