Jump to solution
Verify

The Fix

pip install celery==4.4.0rc5

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

Production note: This usually shows up under retries/timeouts. Treat it as a side-effect risk until you can verify behavior with a canary + real traffic.

Jump to Verify Open PR/Commit
@@ -130,9 +130,9 @@ def add_compat(self, name, **options): def _add(self, queue): + if queue.exchange is None or queue.exchange.name == '': + queue.exchange = self.default_exchange if not queue.routing_key:
repro.py
amqp==2.5.1 asn1crypto==0.24.0 atomicwrites==1.3.0 attrs==19.1.0 Automat==0.7.0 backcall==0.1.0 billiard==3.6.1.0 case==1.5.3 celery==4.3.0 cffi==1.12.3 constantly==15.1.0 cryptography==2.7 cssselect==1.1.0 decorator==4.4.0 hyperlink==19.0.0 idna==2.8 importlib-metadata==0.23 incremental==17.5.0 ipython==7.8.0 ipython-genutils==0.2.0 jedi==0.15.1 kombu==4.6.4 librabbitmq==2.0.0 linecache2==1.0.0 lxml==4.4.1 mock==3.0.5 more-itertools==7.2.0 mysqlclient==1.4.4 nose==1.3.7 packaging==19.2 parsel==1.5.2 parso==0.5.1 pexpect==4.7.0 pickleshare==0.7.5 pluggy==0.13.0 prompt-toolkit==2.0.9 ptyprocess==0.6.0 py==1.8.0 pyasn1==0.4.7 pyasn1-modules==0.2.6 pycparser==2.19 PyDispatcher==2.0.5 Pygments==2.4.2 PyHamcrest==1.9.0 pyOpenSSL==19.0.0 pyparsing==2.4.2 pytest==5.2.1 pytz==2019.2 queuelib==1.5.0 Scrapy==1.7.3 scrapy-selenium==0.0.7 selenium==3.141.0 service-identity==18.1.0 six==1.12.0 SQLAlchemy==1.3.8 traceback2==1.4.0 traitlets==4.3.2 Twisted==19.7.0 unittest2==1.1.0 urllib3==1.25.6 vine==1.3.0 w3lib==1.21.0 wcwidth==0.1.7 zipp==0.6.0 zope.interface==4.6.0
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: Do not apply this fix if the default exchange should remain unset for specific queues.\n\n

Why This Fix Works in Production

  • Trigger: task_default_exchange&task_default_exchange_type config not work
  • Mechanism: The default exchange was not set when the queue exchange was missing
  • Why the fix works: Fixes the issue where task_default_exchange and task_default_exchange_type configurations do not work. (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 default exchange was not set when the queue exchange was missing
  • Production symptom (often without a traceback): task_default_exchange&task_default_exchange_type config not work

Proof / Evidence

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

Discussion

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

“<!-- Please fill this template entirely and do not erase parts of it. We reserve the right to close without a response bug reports which are incomplete. --> # Checklist <!-- To check an item on the list replace [ ] with [x]. --> - [x] I hav”
Issue thread · issue description · source

Failure Signature (Search String)

  • task_default_exchange&task_default_exchange_type config not work
  • - [x] I have included all related issues and possible duplicate issues
Copy-friendly signature
signature.txt
Failure Signature ----------------- task_default_exchange&task_default_exchange_type config not work - [x] I have included all related issues and possible duplicate issues

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- task_default_exchange&task_default_exchange_type config not work - [x] I have included all related issues and possible duplicate issues

Minimal Reproduction

repro.py
amqp==2.5.1 asn1crypto==0.24.0 atomicwrites==1.3.0 attrs==19.1.0 Automat==0.7.0 backcall==0.1.0 billiard==3.6.1.0 case==1.5.3 celery==4.3.0 cffi==1.12.3 constantly==15.1.0 cryptography==2.7 cssselect==1.1.0 decorator==4.4.0 hyperlink==19.0.0 idna==2.8 importlib-metadata==0.23 incremental==17.5.0 ipython==7.8.0 ipython-genutils==0.2.0 jedi==0.15.1 kombu==4.6.4 librabbitmq==2.0.0 linecache2==1.0.0 lxml==4.4.1 mock==3.0.5 more-itertools==7.2.0 mysqlclient==1.4.4 nose==1.3.7 packaging==19.2 parsel==1.5.2 parso==0.5.1 pexpect==4.7.0 pickleshare==0.7.5 pluggy==0.13.0 prompt-toolkit==2.0.9 ptyprocess==0.6.0 py==1.8.0 pyasn1==0.4.7 pyasn1-modules==0.2.6 pycparser==2.19 PyDispatcher==2.0.5 Pygments==2.4.2 PyHamcrest==1.9.0 pyOpenSSL==19.0.0 pyparsing==2.4.2 pytest==5.2.1 pytz==2019.2 queuelib==1.5.0 Scrapy==1.7.3 scrapy-selenium==0.0.7 selenium==3.141.0 service-identity==18.1.0 six==1.12.0 SQLAlchemy==1.3.8 traceback2==1.4.0 traitlets==4.3.2 Twisted==19.7.0 unittest2==1.1.0 urllib3==1.25.6 vine==1.3.0 w3lib==1.21.0 wcwidth==0.1.7 zipp==0.6.0 zope.interface==4.6.0

What Broke

Tasks were not routed correctly due to misconfigured default exchange settings.

Why It Broke

The default exchange was not set when the queue exchange was missing

Fix Options (Details)

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

pip install celery==4.4.0rc5

When NOT to use: Do not apply this fix if the default exchange should remain unset for specific queues.

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/5773

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

  • Do not apply this fix if the default exchange should remain unset for specific queues.

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.