<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi all,<br>
<br>
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. <br>
<br>
The problem comes when there's no delay when producer is enqueuing
messages, this is the basic code (where variable <i>productor_time</i>
is the time between enqueuing messages):<br>
<br>
[...]<br>
<small> EventMachine.add_periodic_timer( productor_time
) do<br>
exchange.publish message, :routing_key =>
"queue0", :persistent => (true)<br>
progress(1)<br>
end</small><br>
[...]<br>
<br>
When <i>productor_time</i> 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 <i>productor_time</i> is more than
0, for example 0.1, there's no problem and consumers dequeue
messages normally.<br>
<br>
<br>
The code for consumer:<br>
<br>
<small> queue.subscribe(:ack => true) do |header,
message|<br>
messages << message<br>
header.ack<br>
progress(1)<br>
end</small><br>
<br>
<br>
If I try with ruby-STOMP interface this problem is not present.<br>
<br>
Do you know what is happening here?<br>
<br>
Thanks<br>
<br>
Cheers,<br>
<br>
Pablo<br>
</body>
</html>