Jump to solution
Verify

The Fix

pip install celery==4.4.0rc5

Based on closed celery/celery issue #4896 · PR/commit linked

Production note: Most teams hit this during upgrades or environment changes. Roll out with a canary and smoke critical endpoints (health, OpenAPI/docs) before 100%.

Jump to Verify Open PR/Commit
@@ -142,9 +142,9 @@ def _add(self, queue): policy = self.ha_policy if isinstance(policy, (list, tuple)): - return args.update({'x-ha-policy': 'nodes', - 'x-ha-policy-params': list(policy)}) - args['x-ha-policy'] = policy
repro.py
def _set_ha_policy(self, args): policy = self.ha_policy if isinstance(policy, (list, tuple)): return args.update({'x-ha-policy': 'nodes', 'x-ha-policy-params': list(policy)}) args['x-ha-policy'] = policy
verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
fix.md
Option A — Upgrade to fixed release\npip install celery==4.4.0rc5\nWhen NOT to use: This fix is not applicable if using RabbitMQ versions prior to 3.\n\n

Why This Fix Works in Production

  • Trigger: CELERY_QUEUE_HA_POLICY has no effect on RabbitMQ 3 due to change of x-ha-policy to ha-mode
  • Mechanism: The HA policy string was changed from x-ha-policy to ha-mode in RabbitMQ 3
  • Why the fix works: Changed the HA policy from x-ha-policy to ha-mode for RabbitMQ 3 compatibility. (first fixed release: 4.4.0rc5).
Production impact:
  • If left unfixed, the same config can fail only in production (env differences), causing startup failures or partial feature outages.

Why This Breaks in Prod

  • The HA policy string was changed from x-ha-policy to ha-mode in RabbitMQ 3
  • Production symptom (often without a traceback): CELERY_QUEUE_HA_POLICY has no effect on RabbitMQ 3 due to change of x-ha-policy to ha-mode

Proof / Evidence

  • GitHub issue: #4896
  • Fix PR: https://github.com/celery/celery/pull/4971
  • First fixed release: 4.4.0rc5
  • Reproduced locally: No (not executed)
  • Last verified: 2026-02-09
  • Confidence: 0.95
  • Did this fix it?: Yes (upstream fix exists)
  • Own content ratio: 0.57

Discussion

High-signal excerpts from the issue thread (symptoms, repros, edge-cases).

“change the linked code from this: to this:”
@joekohlsdorf · 2018-08-13 · source
“thanks, will do so. hope you will have time to review the pr https://github.com/celery/celery/pull/4971”
@auvipy · 2018-08-13 · source

Failure Signature (Search String)

  • CELERY_QUEUE_HA_POLICY has no effect on RabbitMQ 3 due to change of x-ha-policy to ha-mode
  • This does not make queues mirrored in RabbitMQ 3 (released 2012).
Copy-friendly signature
signature.txt
Failure Signature ----------------- CELERY_QUEUE_HA_POLICY has no effect on RabbitMQ 3 due to change of x-ha-policy to ha-mode This does not make queues mirrored in RabbitMQ 3 (released 2012).

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- CELERY_QUEUE_HA_POLICY has no effect on RabbitMQ 3 due to change of x-ha-policy to ha-mode This does not make queues mirrored in RabbitMQ 3 (released 2012).

Minimal Reproduction

repro.py
def _set_ha_policy(self, args): policy = self.ha_policy if isinstance(policy, (list, tuple)): return args.update({'x-ha-policy': 'nodes', 'x-ha-policy-params': list(policy)}) args['x-ha-policy'] = policy

What Broke

Queues are not mirrored in RabbitMQ 3 despite setting the HA policy.

Why It Broke

The HA policy string was changed from x-ha-policy to ha-mode in RabbitMQ 3

Fix Options (Details)

Option A — Upgrade to fixed release Safe default (recommended)

pip install celery==4.4.0rc5

When NOT to use: This fix is not applicable if using RabbitMQ versions prior to 3.

Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.

Fix reference: https://github.com/celery/celery/pull/4971

First fixed release: 4.4.0rc5

Last verified: 2026-02-09. Validate in your environment.

Get updates

We publish verified fixes weekly. No spam.

Subscribe

When NOT to Use This Fix

  • This fix is not applicable if using RabbitMQ versions prior to 3.

Verify Fix

verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.

Did This Fix Work in Your Case?

Quick signal helps us prioritize which fixes to verify and improve.

Prevention

  • Capture the exact failing error string in logs and tests so you can reproduce via a minimal script.
  • Pin production dependencies and upgrade only with a reproducible test that hits the failing path.

Version Compatibility Table

VersionStatus
4.4.0rc5 Fixed

Related Issues

No related fixes found.

Sources

We don’t republish the full GitHub discussion text. Use the links above for context.