elasticsearch/elasticsearch-river-rabbitmq — pull request #55 by nhooey (2014-03-19 22:08:27+00:00)
Title: Set the basic QOS on a channel to avoid infinite prefetching.

Without executing `Channel.basicQos()`, ElasticSearch's RabbitMQ client will prefetch an infinite number of messages from the queue and eventually run out of heap space.

This patch limits the prefetched messages to twice the amount specified by the river's `bulk_size`.

It might make sense to make this a configuration option as either an absolute number or multiple.