Skip to main content

A rewrite of the original Celery AMQP result backend that supports Celery 5.0 and newer.

Project description

celery-amqp-backend

PyPI Test Status Codecov

celery-amqp-backend is a rewrite of the Celery's original amqp:// result backend, which was removed from Celery with version 5.0. Celery encourages you to use the newer rpc:// result backend, as it does not create a new result queue for each task and thus is faster in many circumstances. However, it's not always possible to switch to the new rpc:// result backend, as it does have restrictions as follows:

  • rpc:// does not support chords.
  • rpc:// results may hold a wrong state.
  • rpc:// may lose results when using gevent or greenlet.

The result backend celery_amqp_backend.AMQPBackend:// does not suffer from the same issues.

Installation

With a correctly configured pipenv toolchain:

pipenv install git+https://github.com/anexia-it/celery-amqp-backend.git@main

You may also use classic pip to install the package:

pip install git+https://github.com/anexia-it/celery-amqp-backend.git@main

Getting started

Configuration options

result_backend: str

Set to 'celery_amqp_backend.AMQPBackend://' to use this result backend.

result_persistent: bool

Default: False

If set to True, result queues will be persistent queues. This means that messages will not be lost after a message broker restart.

result_exchange: str

Default: 'celery_result'

The prefix for result queues created by the backend (e.g. if result_exchange is set to 'example', a result queue may be named 'example.36723ac0-aacf-4668-8927-08794d0b082e').

result_exchange_type: str

Default: 'direct'

The type of the exchange created by the backend (e.g. 'direct', 'topic' etc.).

Example configuration

result_backend = 'celery_amqp_backend.AMQPBackend://'
result_persistent = False
result_exchange = 'celery_result'
result_exchange_type = 'direct'

Supported versions

Celery 5.0 Celery 5.1
Python 3.6
Python 3.7
Python 3.8
Python 3.9
Python 3.10

List of developers

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

celery-amqp-backend-1.0.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

celery_amqp_backend-1.0.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file celery-amqp-backend-1.0.0.tar.gz.

File metadata

  • Download URL: celery-amqp-backend-1.0.0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for celery-amqp-backend-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8a05b11235a579c06203952b4f569345ef714f0f4c10acf13b711a3db3006a5e
MD5 21a6a9781483ef9885a0053f6b073def
BLAKE2b-256 40310e6e9134e87cd24a9a2b2825dbc62a57746a2e688bab87d49dc48494fc95

See more details on using hashes here.

File details

Details for the file celery_amqp_backend-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: celery_amqp_backend-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for celery_amqp_backend-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 187aa259affdca08c9e7fdeee3c8d48e7533819d5e83e496ca27f1c9e8514c29
MD5 b93f575429e7d057f5a6474e5802dcbb
BLAKE2b-256 7526fa888175474daebea291395324c8046def84a9136acd4bf6cd11a3529fdc

See more details on using hashes here.

Supported by

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