Nov 9th, 2010, 11:13 AM
Consumption rate question
I have a consumer running consuming at very high rate (4000 /s) with ack turned off
Does the consumer buffers the message from broker and keeps in its local queue?
If so, is there a way to prevent the the local queue from getting out of memory? cause the rate at which i can process a message will the slower that the 4000/s rate.
Nov 29th, 2010, 05:52 AM
AMQP has a prefetch limit ("Quality of Service") that you can set on the channel before you consume any messages. Spring AMQP exposes that as a prefetchCount property in the message listener container. But if you are auto-acking my reading is that this has no effect (did you try it?). Maybe you have to consider acking the messages? You can set the txSize (in the current master version of Spring AMQP, or nightly snapshots) in the message listener container quite high to make it more efficient. If it works, but isn't as fast as you like we could consider optimisations.