I am using RabbitMQ successfully. However, I have a problem where if I get in the situation where there are lots of messages on the queue then the consumer (a Windows servic
A consumer, by default will read as many messages as the bandwidth can handle regardless of actual message processing time by the consumer.
You need to set prefetch values by modifying the Quality of Service (QoS) of the channel to restrict how many messages it will try to pick up at one time. Check out basic.qos here. It has 3 parameters, a size (in octets), a count (the number of whole messages it will pick up at one time) and a global flag.
This blog post is an interesting read if you are interested in optimising throughput and talks about prefetching about 2/3 of the way down the page.
Hope that helps!