Merge lp:~cprov/adt-cloud-worker/qos into lp:adt-cloud-worker

Proposed by Celso Providelo
Status: Merged
Approved by: Celso Providelo
Approved revision: 33
Merged at revision: 32
Proposed branch: lp:~cprov/adt-cloud-worker/qos
Merge into: lp:adt-cloud-worker
Diff against target: 14 lines (+4/-0)
1 file modified
adt_cloud_worker/__init__.py (+4/-0)
To merge this branch: bzr merge lp:~cprov/adt-cloud-worker/qos
Reviewer Review Type Date Requested Status
Paul Larson Approve
Review via email: mp+253729@code.launchpad.net

Commit message

Set a fair QoS to our multi-worker environment (prefetch_count=1)

Description of the change

Set a fair QoS to our multi-worker environment (prefetch_count=1)

To post a comment you must log in.
lp:~cprov/adt-cloud-worker/qos updated
33. By Celso Providelo

better wording.

Revision history for this message
Paul Larson (pwlars) wrote :

Same question as the other related one, otherwise +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'adt_cloud_worker/__init__.py'
2--- adt_cloud_worker/__init__.py 2015-03-20 01:52:28 +0000
3+++ adt_cloud_worker/__init__.py 2015-03-20 19:17:31 +0000
4@@ -63,6 +63,10 @@
5
6 def get_consumers(self, Consumer, channel):
7 """Return consumers instances for all configured queues."""
8+ # Set a fair QoS for a multi-worker environment with
9+ # late-acknowledgement. Each worker should only be fed a single
10+ # message at time (prefetch_count).
11+ channel.basic_qos(prefetch_size=0, prefetch_count=1, a_global=False)
12 exchange = kombu.Exchange("adt.exchange", type="topic")
13 queues = [
14 kombu.Queue(

Subscribers

People subscribed via source and target branches