[rabbitmq-discuss] RabbitMQ perfomance testing & troubles

Matthias Radestock matthias at lshift.net
Fri Apr 25 07:15:20 BST 2008


Andrew V.Statsenko wrote:
>> - make sure that all the producer & consumer connections are set up and 
>> the queues have been created before starting to send any messages
> Yes, all producers & consumers connections are set before start
> send/recieve messages (class constructor) and thread sleep 10 sec after
> queues creation and before starting to send any messages

You should move the exchange declaration, queue declaration, queue bind 
and basicConsume call into the constructors. Then you won't need the 
'sleep' either.

This is important because ...

> But, then I try to calculate message log I have a some confuse 
> $ cat client.log | ggrep -v -E "(START|STOP)" | grep
>  1000000
> $ cat client.log | ggrep -v -E "(START|STOP)" | grep
>   137983
> Logs tells that I send 1000000 messages, but recieve only 137983 . 
> Hmm... So, why ? 
> I can't loss any messages in real play. The test code is attached.

You are creating and binding the queues inside the thread. That creates 
a race; the producer may have started sending messages before the 
consumer queue has been created and bound, which results in the early 
messages being dropped.

Btw, I notice that you have set frameMax to 128. Why?


More information about the rabbitmq-discuss mailing list