Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Set the basic QOS on a channel to avoid infinite prefetching. #55

Closed
wants to merge 1 commit into from
Closed

Set the basic QOS on a channel to avoid infinite prefetching. #55

wants to merge 1 commit into from

Conversation

nhooey
Copy link
Contributor

@nhooey nhooey commented Mar 19, 2014

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.

@nhooey nhooey closed this Mar 20, 2014
@nhooey nhooey reopened this Mar 20, 2014
@dadoonet dadoonet added this to the 2.2.0 milestone Aug 19, 2014
@dadoonet dadoonet self-assigned this Aug 19, 2014
@dadoonet dadoonet closed this in d79a6e2 Aug 19, 2014
dadoonet added a commit that referenced this pull request Aug 19, 2014
Setting `qos_prefetch_size` will define maximum amount of content (measured in octets) that the server will deliver
(0 if unlimited - default).

Setting `qos_prefetch_count` will define maximum number of messages that the server will deliver (0 if unlimited).
Default to `bulk_size*2`.

Closes #38.
Closes #55.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants