Skip to main content

Transactional Outbox pattern for Celery tasks in Django

Project description

django-celery-outbox

Tests CodeQL PyPI version Docs License: MIT

Transactional Outbox pattern for Celery tasks in Django.

Features

  • Durable persistence for committed task intents
  • Duplicate-tolerant relay recovery
  • Automatic retry with capped exponential backoff
  • Dead letter queue for exhausted retries
  • Structlog & Sentry trace propagation
  • StatsD metrics
  • Django admin integration

Quick Start

pip install django-celery-outbox
# settings.py
INSTALLED_APPS = [..., 'django_celery_outbox']
CELERY_OUTBOX_APP = 'myproject.celery.app'

# celery.py
from django_celery_outbox import OutboxCelery

app = OutboxCelery('myproject')
python manage.py migrate
python manage.py check
python manage.py celery_outbox_relay

Committed rows stay in the outbox until the relay publishes them or dead-letters them, but consumers still need to be idempotent. If the relay crashes after a broker publish and before cleanup, stale-timeout recovery can reclaim and resend the row. Stronger end-to-end guarantees still depend on broker confirms; without publisher confirms, the broker can fail ambiguously after Celery.send_task() returns.

Full Documentation →

Security

See Security Guide for PII handling, traceback logging, and DLQ retention.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_celery_outbox-0.3.0.tar.gz (55.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_celery_outbox-0.3.0-py3-none-any.whl (73.8 kB view details)

Uploaded Python 3

File details

Details for the file django_celery_outbox-0.3.0.tar.gz.

File metadata

  • Download URL: django_celery_outbox-0.3.0.tar.gz
  • Upload date:
  • Size: 55.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for django_celery_outbox-0.3.0.tar.gz
Algorithm Hash digest
SHA256 d93872195ad20c4e03df3535b1d84f9c9ed52bfebdc927797dda87de7b096676
MD5 206d53cad305f15cf977d4ea4545fc7d
BLAKE2b-256 0c2dca61be2cd46db0e56ec463fe7278df93a7dacbd87c13b58771b7c7bef683

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_celery_outbox-0.3.0.tar.gz:

Publisher: publish.yml on Barsoomx/django-celery-outbox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_celery_outbox-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_celery_outbox-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 db90a7825fada969259d7d07c4b7129cf18c384f12c5049c0d45eeb1eb8ee69a
MD5 e5214fe026c893a2ea400d4ae1af407d
BLAKE2b-256 3f2f842e62f7d34ab01bb97de605c8c84f04669d30f8e19a9192b7d10fdb2ab4

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_celery_outbox-0.3.0-py3-none-any.whl:

Publisher: publish.yml on Barsoomx/django-celery-outbox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page