NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #522 most downloaded on PyPI
Messaging library for Python.
Last release 2 days ago
21 Sep 2026
Ships unpredictably
gaps range from 2 weeks to 9 months
Nearly every release is documented
notes for 58 of the last 60 stable releases
2 versions withdrawn
withdrawn after publishing
16 years old
207 releases · first in 2010
:release-date: 2019-03-3 18:30 P.M UTC+3:00 :release-by: Omer Katz
The Redis transport now supports a custom separator for keys.
Previously when storing a key in Redis which represents a queue we used the hardcored value \x06\x16 separator to store different attributes of the queue in the queue's name.
The separator is now configurable using the sep transport option:
with Connection('redis://', transport_options={
'sep': ':',
}):
# ...
pass
Contributed by Joris Beckers
When the SQS server returns a timeout we ignore it and keep trying instead of raising an error.
This will prevent Celery from raising an error and hanging.
Contributed by Erwin Rossen
Properly declare async support for the Qpid transport.
If you are using this transport we strongly urge you to upgrade.
Contributed by Rohan McGovern
Revert celery/kombu#906 and introduce unique broadcast queue names as an optional keyword argument.
If you want each broadcast queue to have a unique name specify unique=True:
>>> from kombu.common import Broadcast
>>> q = Broadcast(queue='foo', unique=True)
>>> q.name
'foo.7ee1ac20-cda3-4966-aaf8-e7a3bb548688'
>>> q = Broadcast(queue='foo')
>>> q.name
'foo'
Codebase improvements and fixes by:
Omer Katz
One column per quarter.
:release-date: 2019-03-3 9:00 P.M UTC+2:00 :release-by: Omer Katz
Restore bz2 import checks in compression module.
The checks were removed in celery/kombu#938 due to assumption that it only affected Jython. However, bz2 support can be missing in Pythons built without bz2 support.
Contributed by Patrick Woods
Fix regression that occurred in 4.3.0 when parsing Redis Sentinel master URI containing password.
Contributed by Peter Lithammer
Handle the case when only one Redis Sentinel node is provided.
Contributed by Peter Lithammer
Support SSL URL parameters correctly for rediss://` URIs.
Contributed by Paul Bailey
Revert celery/kombu#954. Instead bump the required redis-py dependency to 3.2.0 to include this fix andymccurdy/redis-py@4e1e748.
Contributed by Peter Lithammer
Added support for broadcasting using a regular expression pattern or a glob pattern to multiple Pidboxes.
Contributed by Jason Held
:release-date: 2019-01-14 7:00 P.M UTC+2:00 :release-by: Omer Katz
Added Python 3.7 support.
Contributed by Omer Katz, Mads Jensen and Asif Saif Uddin
Avoid caching queues which are declared with a TTL.
Queues that are declared with a TTL are now also be excluded from the in-memory cache in case they expire between publishes on the same channel.
Contributed by Matt Yule-Bennett
Added an index to the Message table for the SQLAlchemy transport.
The index allows to effectively sorting the table by the message's timestamp.
Note
We do not provide migrations for this model yet. You will need to add the index manually if you are already using the SQLAlchemy transport.
The syntax may vary between databases. Please refer to your database's documentation for instructions.
Contributed by Mikhail Shcherbinin
Added a timeout that limits the amount of time we retry to reconnect to a transport.
Contributed by :github_user:`tothegump`
:class:celery.asynchronous.hub.Hub is now reentrant.
This allows calling celery.bin.celery.main to revive a worker in the same process after rescuing from shutdown (:class:SystemExit).
Contributed by Alan Justino da Silva
Queues now accept string exchange names as arguments as documented.
Tests were added to avoid further regressions.
Contributed by Antonio Gutierrez
Specifying names for broadcast queues now work as expected.
Previously, named broadcast queues did not create multiple queues per worker. They incorrectly declared the named queue which resulted in one queue per fanout exchange, thus missing the entire point of a fanout exchange. The behavior is now matched to unnamed broadcast queues.
Contributed by Kuan Hsuan-Tso
When initializing the Redis transport in conjunction with gevent restore all unacknowledged messages to queue.
Contributed by Gal Cohen
Allow :class:kombu.simple.SimpleQueue to pass queue_arguments to Queue object.
This allows :class:kombu.simple.SimpleQueue to connect to RabbitMQ queues with custom arguments like 'x-queue-mode'='lazy'.
Contributed by C Blue Neeh
Add support for 'rediss' scheme for secure Redis connections.
The rediss scheme defaults to the least secure form, as there is no suitable default location for ca_certs. The recommendation would still be to follow the documentation and specify broker_use_ssl if coming from celery.
Contributed by Daniel Blair
Added the Azure Storage Queues transport.
The transport is implemented on top of Azure Storage Queues. This offers a simple but scalable and low-cost PaaS transport for Celery users in Azure. The transport is intended to be used in conjunction with the Azure Block Blob Storage backend.
Contributed by Clemens Wolff, :github_user:`@ankurokok`, Denis Kisselev, Evandro de Paula, Martin Peck and :github_user:`@michaelperel`
Added the Azure Service Bus transport.
The transport is implemented on top of Azure Service Bus and offers PaaS support for more demanding Celery workloads in Azure. The transport is intended to be used in conjunction with the Azure CosmosDB backend.
Contributed by Clemens Wolff, :github_user:`@ankurokok`, Denis Kisselev, Evandro de Paula, Martin Peck and :github_user:`@michaelperel`
Drop remaining mentions of Jython support completely.
Contributed by Asif Saif Uddin and Mads Jensen
When publishing messages to the Pidbox, retry if an error occurs.
Contributed by Asif Saif Uddin
Fix infinite loop in :method:kombu.asynchronous.hub.Hub.create_loop.
Previous attempt to fix the problem (PR kombu/760) did not consider an edge case. It is now fixed.
Contributed by Vsevolod Strukchinsky
Worker shutdown no longer duplicates messages when using the SQS broker.
Contributed by Mintu Kumar Sah
When using the SQS broker, prefer boto's default region before our hardcoded default.
Contributed by Victor Villas
Fixed closing of shared redis sockets which previously caused Celery to hang.
Contributed by Alexey Popravka
the `Pyro`_ transport (kombu.transport.pyro) now works with recent Pyro versions. Also added a Pyro Kombu Broker that this transport needs for its queues.
Contributed by Irmen de Jong
Handle non-base64-encoded SQS messages.
Fix contributed by Tim Li, Asif Saif Uddin and Omer Katz.
Move the handling of Sentinel failures to the redis library itself.
Previously, Redis Sentinel worked only if the first node's sentinel service in the URI was up. A server outage would have caused downtime.
Contributed by Brian Price
When using Celery and the pickle serializer with binary data as part of the payload, UnicodeDecodeError would be raised as the content was not utf-8. We now replace on errors.
Contributed by Jian Dai
Allow setting :method:boto3.sqs.create_queue Attributes via transport_options.
Contributed by Hunter Fernandes
Fixed infinite loop when entity.channel is replaced by revive() on connection drop.
Contributed by Tzach Yarimi
Added optional support for Brotli compression.
Contributed by Omer Katz
When using the SQS broker, FIFO queues with names that ended with the 'f' letter were incorrectly parsed. This is now fixed.
Contributed by Alex Vishnya and Ilya Konstantinov
Added optional support for LZMA compression.
Contributed by Omer Katz
Added optional support for ZStandard compression.
Contributed by Omer Katz
Require py-amqp 2.4.0 as the minimum version.
Contributed by Asif Saif Uddin
The value of DISABLE_TRACEBACKS environment variable is now respected on debug, info and warning logger level.
Contributed by Ludovic Rivallain
As documented in kombu/#741 and eventlet/eventlet#415 there is a mismatch between the monkey-patched eventlet queue and the interface Kombu is expecting. This causes Celery to crash when the broker_pool_limit configuration option is set eventlet/eventlet#415 suggests that the mutex can be a noop. This is now the case.
Contributed by Josh Morrow
Codebase improvements and fixes by:
Omer Katz
Mads Jensen
Asif Saif Uddin
Lars Rinn
Documentation improvements by:
Jon Dufresne
Fay Cheng
Asif Saif Uddin
Kyle Verhoog
Noah Hall
:github_user:`brabiega`
:release-date: 2019-01-01 04:00 P.M IST :release-by: Omer Katz
Note
The previous release contained code from master. It is now deleted from PyPi. Please use this release instead.
No changes since previous release.
:release-date: 2018-05-21 09:00 A.M IST :release-by: Omer Katz
Note
The 4.2.0 release contained remains of the async module by accident. This is now fixed.
Handle librabbitmq fileno raising a ValueError when socket is not connected.
Contributed by Bryan Shelton
:release-date: 2018-05-21 09:00 A.M IST :release-by: Omer Katz
Now passing max_retries, interval_start, interval_step, interval_max parameters from broker transport_options to ~kombu.Connection.ensure_connection when returning ~kombu.Connection.default_connection (Issue #765).
Contributed by Anthony Lukach.
Qpid: messages are now durable by default
Contributed by David Davis
Kombu now requires version 2.10.4 or greater of the redis library, in line with Celery
Contributed by Colin Jeanne
Fixed ImportError in some environments with outdated simplejson
Contributed by Aaron Morris
MongoDB: fixed failure on MongoDB versions with an "-rc" tag
Contributed by dust8
Ensure periodic polling frequency does not exceed timeout in virtual transport
Contributed by Arcadiy Ivanov
Fixed string handling when using python-future module
Contributed by John Koehl
Replaced "async" with "asynchronous" in preparation for Python 3.7
Contributed by Thomas Achtemichuk
Allow removing pool size limit when in use
Contributed by Alex Hill
Codebase improvements and fixes by:
j2gg0s
Jon Dufresne
Jonas Lergell
Mads Jensen
Nicolas Delaby
Omer Katz
Documentation improvements by:
Felix Yan
Harry Moreno
Mads Jensen
Omer Katz
Radha Krishna. S.
Wojciech Matyśkiewicz
Removed deprecated use of StopIteration in generators and invalid regex escape sequence.
SQS: Added support for long-polling on all supported queries. Fixed bug causing error on parsing responses with no retrieved messages from SQS.
Contributed by Anthony Lukach.
Async hub: Fixed potential infinite loop while performing todo tasks (Issue celery/celery#3712).
Qpid: Fixed bug where messages could have duplicate delivery_tag (Issue #563).
Contributed by bmbouter.
MongoDB: Fixed problem with using readPreference option at pymongo 3.x.
Contributed by Mikhail Elovskikh.
Re-added support for :pypi:SQLAlchemy
Contributed by Amin Ghadersohi.
SQS: Fixed bug where hostname would default to localhost if not specified in settings.
Contributed by Anthony Lukach.
Redis: Added support for reading password from transport URL (Issue #677).
Contributed by George Psarakis.
RabbitMQ: Ensured safer encoding of queue arguments.
Contributed by Robert Kopaczewski.
Added fallback to :func:uuid.uuid5 in :func:generate_oid if :func:uuid.uuid3 fails.
Contributed by Bill Nottingham.
Fixed race condition and innacurrate timeouts for :class:kombu.simple.SimpleBase (Issue #720).
Contributed by c-nichols.
Zookeeper: Fixed last chroot character trimming
Contributed by Dima Kurguzov.
RabbitMQ: Fixed bug causing an exception when attempting to close an already-closed connection (Issue #690).
Contributed by eavictor.
Removed deprecated use of StopIteration in generators and invalid regex escape sequence.
Contributed by Jon Dufresne.
Added Python 3.6 to CI testing.
Contributed by Jon Dufresne.
SQS: Allowed endpoint URL to be specified in the boto3 connection.
Contributed by georgepsarakis.
SQS: Added support for Python 3.4.
Contributed by Anthony Lukach.
SQS: kombu[sqs] now depends on boto3 (no longer using boto).
Adds support for Python 3.4+
Adds support for FIFO queues (Issue #678) and (Issue celery/celery#3690)
Avoids issues around a broken endpoints file (Issue celery/celery#3672)
Contributed by Mischa Spiegelmock and Jerry Seutter.
Zookeeper: Added support for delaying task with Python 3.
Contributed by Dima Kurguzov.
SQS: Fixed bug where kombu.transport.SQS.drain_events did not support callback argument (Issue #694).
Contributed by Michael Montgomery.
Fixed bug around modifying dictionary size while iterating over it (Issue #675).
Contributed by Felix Yan.
etcd: Added handling for EtcdException exception rather than EtcdError.
Contributed by Stephen Milner.
Documentation improvements by:
Mads Jensen
Matias Insaurralde
Omer Katz
Dmitry Dygalo
Christopher Hoskin
:release-date: 2016-12-15 03:31 P.M PST :release-by: Ask Solem
Now depends on amqp 2.1.4
This new version takes advantage of TCP Keepalive settings on Linux, making it better at detecting closed connections, also in failover conditions.
Redis: Priority was reversed so, e.g. priority 0 became priority 9.
:release-date: 2016-12-07 06:00 P.M PST :release-by: Ask Solem
Now depends on amqp 2.1.3
This new version takes advantage of the new TCP_USER_TIMEOUT socket option on Linux.
Producer: Fixed performance degradation when default exchange specified (Issue #651).
QPid: Switch to using getattr in qpid.Transport.__del__ (Issue #658)
Contributed by Patrick Creech.
QPid: Now uses monotonic time for timeouts.
MongoDB: Fixed compatibility with Python 3 (Issue #661).
Consumer: __exit__ now skips cancelling consumer if connection-related error raised (Issue #670).
MongoDB: Removes use of natural sort (Issue #638).
Contributed by Anton Chaporgin.
Fixed wrong keyword argument channel error (Issue #652).
Contributed by Toomore Chiang.
Safe argument to urllib.quote must be bytes on Python 2.x (Issue #645).
Documentation improvements by:
Carlos Edo
Cemre Mengu
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
:release-date: 2016-10-06 05:00 P.M PDT :release-by: Ask Solem
Connection: Return value of .info() was no longer JSON serializable, leading to "itertools.cycle object not JSON serializable" errors (Issue #635).
:release-date: 2016-09-30 03:06 P.M PDT :release-by: Ask Solem
Connection: Fixed bug when cloning connection with alternate urls.
Fix contributed by Emmanuel Cazenave.
Redis: Fixed problem with unix socket connections.
https://github.com/celery/celery/issues/2903
Fix contributed by Raphael Michel.
Redis: Fixed compatibility with older redis-py versions (Issue #576).
Broadcast now retains queue name when being copied/pickled (Issue #578).
:release-date: 2016-03-22 11:22 P.M PST :release-by: Ask Solem
msgpack: msgpack support now requires msgpack-python > 0.4.7.
Redis: TimeoutError was no longer handled as a recoverable error.
Redis: Adds the ability to set more Redis connection options using Connection(transport_options={...}).
socket_connect_timeout
socket_keepalive (requires redis-py > 2.10)
socket_keepalive_options (requires redis-py > 2.10)
msgpack: Fixes support for binary/unicode data
:release-date: 2016-03-03 05:30 P.M PST :release-by: Ask Solem
Qpid: Adds async error handling.
Contributed by Brian Bouterse.
Qpid: Delivery tag is now a UUID4 (Issue #563).
Fix contributed by Brian Bouterse.
Redis: Connection.as_uri() returned malformed URLs when the redis+socket scheme was ised (Issue celery/celery#2995).
msgpack: Use binary encoding instead of utf-8 (Issue #570).
:release-date: 2016-01-08 06:36 P.M PST :release-by: Ask Solem
Now depends on amqp 1.4.9.
Redis: Fixed problem with auxilliary connections causing the main consumer connection to be closed (Issue #550).
Qpid: No longer uses threads to operate, to ensure compatibility with all environments (Issue #531).
:release-date: 2015-12-16 02:29 P.M PST :release-by: Ask Solem
Redis: Fixed bug introduced in 3.0.31 where the redis transport always connects to localhost, regardless of host setting.
:release-date: 2015-12-16 12:00 P.M PST :release-by: Ask Solem
Redis: Fixed bug introduced in 3.0.30 where socket was prematurely disconnected.
Hub: Removed debug logging message: "Deregistered fd..." (Issue #549).
:release-date: 2015-12-07 12:28 A.M PST :release-by: Ask Solem
Fixes compatiblity with uuid in Python 2.7.11 and 3.5.1.
Fix contributed by Kai Groner.
Redis transport: Attempt at fixing problem with hanging consumer after disconnected from server.
Attempt at fixing issue with 100% CPU when using the Redis transport,
Database transport: Fixed oracle compatiblity.
An "ORA-00907: missing right parenthesis" error could manifest when using an Oracle database with the database transport.
Fix contributed by Deepak N.
Documentation fixes
Contributed by Tommaso Barbugli.
:release-date: 2015-10-26 11:10 A.M PDT :release-by: Ask Solem
Fixed serialization issue for bindings.as_dict() (Issue #453).
Fix contributed by Sergey Tikhonov.
Json serializer wrongly treated bytes as ascii, not utf-8 (Issue #532).
MongoDB: Now supports pymongo 3.x.
Contributed by Len Buckens.
SQS: Tests passing on Python 3.
Fix contributed by Felix Yan
:release-date: 2015-10-12 12:00 PM PDT :release-by: Ask Solem
Django transport migrations.
If you're using Django 1.8 and have already created the kombu_transport_django tables, you have to run a fake initial migration:
$ python manage.py migrate kombu_transport_django --fake-initial
No longer compatible with South by default.
To keep using kombu.transport.django with South migrations you now need to configure a new location for the kombu migrations:
SOUTH_MIGRATION_MODULES = { 'kombu_transport_django': 'kombu.transport.django.south_migrations', }
Keep old South migrations in kombu.transport.django.south_migrations.
Now works with Redis < 2.10 again.
:release-date: 2015-10-09 3:10 PM PDT :release-by: Ask Solem
Now depends on amqp 1.4.7.
Fixed libSystem import error on some macOS 10.11 (El Capitan) installations.
Fix contributed by Eric Wang.
Now compatible with Django 1.9.
Django: Adds migrations for the database transport.
Redis: Now depends on py-redis 2.10.0 or later (Issue #468).
QPid: Can now connect as localhost (Issue #519).
Fix contributed by Brian Bouterse.
QPid: Adds support for login_method (Issue #502, Issue #499).
Contributed by Brian Bouterse.
QPid: Now reads SASL mechanism from broker string (Issue #498).
Fix contributed by Brian Bouterse.
QPid: Monitor thread now properly terminated on session close (Issue #485).
Fix contributed by Brian Bouterse.
QPid: Fixed file descriptor leak (Issue #476).
Fix contributed by Jeff Ortel
Docs: Fixed wrong order for entrypoint arguments (Issue #473).
ConsumerMixin: Connection error logs now include traceback (Issue #480).
BaseTransport now raises RecoverableConnectionError when disconnected (Issue #507).
Consumer: Adds tag_prefix option to modify how consumer tags are generated (Issue #509).
:release-date: 2015-04-22 06:00 P.M UTC :release-by: Ask Solem
Fixed compatibility with py-redis versions before 2.10.3 (Issue #470).
:release-date: 2015-04-21 02:00 P.M UTC :release-by: Ask Solem
pyamqp/librabbitmq now uses 5671 as default port when SSL is enabled (Issue #459).
Redis: Now supports passwords in redis+socket://:pass@host:port URLs (Issue #460).
Producer.publish now defines the expiration property in support of the RabbitMQ per-message TTL extension.
Contributed by Anastasis Andronidis.
Connection transport attribute now set correctly for all transports.
Contributed by Alex Koshelev.
qpid: Fixed bug where the connectionw as not being closed properly.
Contributed by Brian Bouterse.
~kombu.entity.bindings is now JSON serializable (Issue #453).
Contributed by Sergey Tikhonov.
Fixed typo in error when yaml is not installed (said msgpack).
Contributed by Joshua Harlow.
Redis: Now properly handles redis.exceptions.TimeoutError raised by redis.
Contributed by markow.
qpid: Adds additional string to check for when connecting to qpid.
When we connect to qpid, we need to ensure that we skip to the next SASL mechanism if the current mechanism fails. Otherwise, we will keep retrying the connection with a non-working mech.
Contributed by Chris Duryee.
qpid: Handle NotFound exceptions.
Contributed by Brian Bouterse.
Queue.__repr__ now makes sure return value is not unicode (Issue #440).
qpid: Queue.purge incorrectly raised AttributeErrror if the does not exist (Issue #439).
Contributed by Brian Bouterse.
Linux: Now ignores permission errors on epoll unregister.
:release-date: 2014-11-17 11:00 P.M UTC :release-by: Ask Solem
The Qpid broker is supported for Python 2.x environments. The Qpid transport includes full SSL support within Kombu. See the kombu.transport.qpid docs for more info.
Contributed by Brian Bouterse and Chris Duryee through support from Red Hat.
Dependencies: extra[librabbitmq] now requires librabbitmq 1.6.0
Docstrings for ~kombu.utils.limit.TokenBucket did not match implementation.
Fix contributed by Jesse Dhillon.
~kombu.common.oid_from accidentally called uuid.getnode() but did not use the return value.
Fix contributed by Alexander Todorov.
Redis: Now ignores errors when cosing the underlying connection.
Redis: Restoring messages will now use a single connection.
kombu.five.monotonic: Can now be imported even if ctypes is not available for some reason (e.g. App Engine)
Documentation: Improved example to use the declare argument to Producer (Issue #423).
Django: Fixed app_label for older Django versions (< 1.7). (Issue #414).
:release-date: 2014-09-14 10:45 P.M UTC :release-by: Ask Solem
Django: Fixed bug in the Django 1.7 compatibility improvements related to autocommit handling.
Contributed by Radek Czajka.
Django: The Django transport models would not be created on syncdb after app label rename (Issue #406).
:release-date: 2014-09-04 03:00 P.M UTC :release-by: Ask Solem
kombu.async: Min. delay between waiting for timer was always increased to one second.
Fixed bug in itermessages where message is received after the with statement exits the block.
Fixed by Rumyana Neykova
(__module__, __name__, __doc__). Fixes #392.
Contributed by johtso.
Django: Now sets custom app label for kombu.transport.django to work with recent changes in Django 1.7.
SimpleQueue removed messages from the wrong end of buffer (Issue #380).
Tests: Now using unittest.mock if available (Issue #381).
:release-date: 2014-07-07 02:00 P.M UTC :release-by: Ask Solem
Fixed remaining bug in maybe_declare for auto_delete exchanges.
Fix contributed by Roger Hu.
MongoDB: Creating a channel now properly evaluates a connection (Issue #363).
Fix contributed by Len Buckens.
:release-date: 2014-06-24 02:30 P.M UTC :release-by: Ask Solem
Reverts change in 3.0.17 where maybe_declare caches the declaration of auto_delete queues and exchanges.
Fix contributed by Roger Hu.
Redis: Fixed race condition when using gevent and the channel is closed.
Fix contributed by Andrew Rodionoff.
:release-date: 2014-06-09 03:10 P.M UTC :release-by: Ask Solem
The wheel distribution did not support Python 2.6 by failing to list the extra dependencies required.
Durable and auto_delete queues/exchanges can be be cached using maybe_declare.
:release-date: 2014-06-02 06:00 P.M UTC :release-by: Ask Solem
A typo introduced in 3.0.17 caused kombu.async.hub to crash (Issue #360).
Nothing published for this version
:release-date: 2014-06-02 05:00 P.M UTC :release-by: Ask Solem
kombu[librabbitmq] now depends on librabbitmq 1.5.2.
Async: Event loop now selectively removes file descriptors for the mode it failed in, and keeps others (e.g read vs write).
Fix contributed by Roger Hu.
CouchDB: Now works without userid set.
Fix contributed by Latitia M. Haskins.
SQLAlchemy: Now supports recovery from connection errors.
Contributed by Felix Schwarz.
Redis: Restore at shutdown now works when ack emulation is disabled.
kombu.common.eventloop accidentally swallowed socket errors.
Adds kombu.utils.url.sanitize_url
:release-date: 2014-05-06 01:00 P.M UTC :release-by: Ask Solem
kombu[librabbitmq] now depends on librabbitmq 1.5.1.
Redis: Fixes TypeError problem in unregister (Issue #342).
Fix contributed by Tobias Schottdorf.
Tests: Some unit tests accidentally required the redis-py library.
Fix contributed by Randy Barlow.
librabbitmq: Would crash when using an older version of librabbitmq, now emits warning instead.
:release-date: 2014-04-15 09:00 P.M UTC :release-by: Ask Solem
Now depends on amqp 1.4.5.
RabbitMQ 3.3 changes QoS semantics (Issue #339).
See the RabbitMQ release notes here: http://www.rabbitmq.com/blog/2014/04/02/breaking-things-with-rabbitmq-3-3/
A new connection property has been added that can be used to detect whether the remote server is using this new QoS behavior:
>>> Connection('amqp://').qos_behavior_matches_spec Falseso if your application depends on the old semantics you can use this to set the apply_global flag appropriately:
def update_prefetch_count(channel, new_value): channel.basic_qos( 0, new_value, not channel.connection.client.qos_behavior_matches_spec, )
Users of librabbitmq is encouraged to upgrade to librabbitmq 1.5.0.
The kombu[librabbitmq] extra has been updated to depend on this version.
Pools: Now takes transport options into account when comparing connections (Issue #333).
MongoDB: Fixes Python 3 compatibility.
Async: select: Ignore socket errors when attempting to unregister handles from the loop.
Pidbox: Can now be configured to use a serializer other than json, but specifying a serializer argument to ~kombu.pidbox.Mailbox.
Contributed by Dmitry Malinovsky.
Message decompression now works with Python 3.
Fix contributed by Adam Gaca.
:release-date: 2014-03-19 07:00 P.M UTC :release-by: Ask Solem
MongoDB: Now endures a connection failover (Issue #123).
Fix contributed by Alex Koshelev.
MongoDB: Fixed KeyError when a replica set member is removed.
Also fixes celery#971 and celery/#898.
Fix contributed by Alex Koshelev.
MongoDB: Fixed MongoDB broadcast cursor re-initialization bug.
Fix contributed by Alex Koshelev.
Async: Fixed bug in lax semaphore implementation where in some usage patterns the limit was not honored correctly.
Fix contributed by Ionel Cristian Mărieș.
Redis: Fixed problem with fanout when using Python 3 (Issue #324).
Redis: Fixed AttributeError from attempting to close a non-existing connection (Issue #320).
This change is not backwards incompatible and you are encouraged to update all your system using a previous version as soon as possible.
Redis: Fixed serious race condition that could lead to data loss.
The delivery tags were accidentally set to be an incremental number local to the channel, but the delivery tags need to be globally unique so that a message can not overwrite an older message in the backup store.
This change is not backwards incompatible and you are encouraged to update all your system using a previous version as soon as possible.
Now depends on amqp 1.4.4.
Pidbox: Now makes sure message encoding errors are handled by default, so that a custom error handler does not need to be specified.
Redis: The fanout exchange can now use AMQP patterns to route and filter messages.
This change is backwards incompatible and must be enabled with the fanout_patterns transport option:
>>> conn = kombu.Connection('redis://', transport_options={ ... 'fanout_patterns': True, ... })When enabled the exchange will work like an amqp topic exchange if the binding key is a pattern.
This is planned to be default behavior in the future.
Redis: Fixed cycle no such attribute error.
:release-date: 2014-02-09 03:50 P.M UTC :release-by: Ask Solem
Now depends on amqp 1.4.3.
Fixes Python 3.4 logging incompatibility (Issue #311).
Redis: Now properly handles unknown pub/sub messages.
Fix contributed by Sam Stavinoha.
amqplib: Fixed bug where more bytes were requested from the socket than necessary.
Fix contributed by Ionel Cristian Mărieș.
:release-date: 2014-02-03 05:00 P.M UTC :release-by: Ask Solem
Now depends on amqp 1.4.2.
Now always trusts messages of type application/data and application/text or which have an unspecified content type (Issue #306).
Compression errors are now handled as decode errors and will trigger the Consumer.on_decode_error callback if specified.
New kombu.Connection.get_heartbeat_interval() method that can be used to access the negotiated heartbeat value.
instead uses a process-wide UUID4 as a node id.
This avoids a call to uuid.getnode() at module scope.
Hub.add: Now normalizes registered fileno.
Contributed by Ionel Cristian Mărieș.
SQS: Fixed bug where the prefetch count limit was not respected.
:release-date: 2014-01-17 05:40 P.M UTC :release-by: Ask Solem
Now depends on amqp 1.4.1.
maybe_declare now raises a "recoverable connection error" if the channel is disconnected instead of a ChannelError so that the operation can be retried.
Redis: Consumer.cancel() is now thread safe.
This fixes an issue when using gevent/eventlet and a message is handled after the consumer is canceled resulting in a "message for queue without consumers" error.
Retry operations would not always respect the interval_start value when calculating the time to sleep for (Issue #303).
Fix contributed by Antoine Legrand.
Timer: Fixed "unhashable type" error on Python 3.
Hub: Do not attempt to unregister operations on an already closed poller instance.
:release-date: 2014-01-13 05:30 P.M UTC :release-by: Ask Solem
Now depends on amqp 1.4.0.
Redis: Basic cancel for fanout based queues now sends a corresponding UNSUBSCRIBE command to the server.
This fixes an issue with pidbox where reply messages could be received after the consumer was canceled, giving the "message to queue without consumers" error.
MongoDB: Improved connection string and options handling (Issue #266 + Issue #120).
Contributed by Alex Koshelev.
SQS: Limit the number of messages when receiving in batch to 10.
This is a hard limit enforced by Amazon so the sqs transport must not exceeed this value.
Fix contributed by Eric Reynolds.
ConsumerMixin: consume now checks heartbeat every time the socket times out.
Contributed by Dustin J. Mitchell.
Retry Policy: A max retries of 0 did not retry forever.
Fix contributed by Antoine Legrand.
Simple: If passing a Queue object the simple utils will now take default routing key from that queue.
Contributed by Fernando Jorge Mota.
repr(producer) no longer evaluates the underlying channnel.
Redis: The map of Redis error classes are now exposed at the module level using the kombu.transport.redis.get_redis_error_classes function.
Async: Hub.close now sets .poller to None.
:release-date: 2013-12-16 05:00 P.M UTC :release-by: Ask Solem
Serializer: loads and dumps now wraps exceptions raised into ~kombu.exceptions.DecodeError and kombu.exceptions.EncodeError respectively.
Contributed by Ionel Cristian Maries
Redis: Would attempt to read from the wrong connection if a select/epoll/kqueue exception event happened.
Fix contributed by Michael Nelson.
Redis: Disabling ack emulation now works properly.
Fix contributed by Michael Nelson.
Redis: IOError and OSError are now treated as recoverable connection errors.
SQS: Improved performance by reading messages in bulk.
Contributed by Matt Wise.
Connection Pool: Attempting to acquire from a closed pool will now raise RuntimeError.
:release-date: 2013-12-02 04:00 P.M UTC :release-by: Ask Solem
Fixes Python 2.6 compatibility.
Redis: Fixes 'bad file descriptor' issue.
:release-date: 2013-11-21 04:50 P.M UTC :release-by: Ask Solem
Timer: No longer attempts to hash keyword arguments (Issue #275).
Async: Did not account for the long type for file descriptors.
Fix contributed by Fabrice Rabaute.
PyPy: kqueue support was broken.
Redis: Bad pub/sub payloads no longer crashes the consumer.
Redis: Unix socket URLs can now specify a virtual host by including it as a query parameter.
Example URL specifying a virtual host using database number 3:
redis+socket:///tmp/redis.sock?virtual_host=3
kombu.VERSION is now a named tuple.
:release-date: 2013-11-15 11:00 P.M UTC :release-by: Ask Solem
Now depends on amqp 1.3.3.
Redis: Fixed Python 3 compatibility problem (Issue #270).
MongoDB: Fixed problem with URL parsing when authentication used.
Fix contributed by dongweiming.
pyamqp: Fixed small issue when publishing the message and the property dictionary was set to None.
Fix contributed by Victor Garcia.
Fixed problem in repr(LaxBoundedSemaphore).
Fix contributed by Antoine Legrand.
Tests now passing on Python 3.3.
:release-date: 2013-11-08 01:00 P.M UTC :release-by: Ask Solem
common.QoS: decrement_eventually now makes sure the value does not go below 1 if a prefetch count is enabled.
:release-date: 2013-11-04 03:00 P.M UTC :release-by: Ask Solem
SQS: Properly reverted patch that caused delays between messages.
Contributed by James Saryerwinnie
select: Clear all registerd fds on poller.cloe
Eventloop: unregister if EBADF raised.
:release-date: 2013-10-29 02:00 P.M UTC :release-by: Ask Solem
Now depends on amqp version 1.3.2.
select: Fixed problem where unregister did not properly remove the fd.
:release-date: 2013-10-24 04:00 P.M UTC :release-by: Ask Solem
Now depends on amqp version 1.3.1.
Redis: New option fanout_keyprefix
This transport option is recommended for all users as it ensures that broadcast (fanout) messages sent is only seen by the current virtual host:
Connection('redis://', transport_options={'fanout_keyprefix': True})However, enabling this means that you cannot send or receive messages from older Kombu versions so make sure all of your participants are upgraded and have the transport option enabled.
This will be the default behavior in Kombu 4.0.
Distribution: Removed file requirements/py25.txt.
MongoDB: Now disables auto_start_request.
MongoDB: Enables use_greenlets if eventlet/gevent used.
Pidbox: Fixes problem where expires header was None, which is a value not supported by the amq protocol.
ConsumerMixin: New consumer_context method for starting the consumer without draining events.
:release-date: 2013-10-14 04:00 P.M BST :release-by: Ask Solem
Now depends on amqp version 1.3.
No longer supports Python 2.5
The minimum Python version supported is now Python 2.6.0 for Python 2, and Python 3.3 for Python 3.
Dual codebase supporting both Python 2 and 3.
No longer using 2to3, making it easier to maintain support for both versions.
pickle, yaml and msgpack deserialization is now disabled by default.
This means that Kombu will by default refuse to handle any content type other than json.
Pickle is known to be a security concern as it will happily load any object that is embedded in a pickle payload, and payloads can be crafted to do almost anything you want. The default serializer in Kombu is json but it also supports a number of other serialization formats that it will evaluate if received: including pickle.
It was always assumed that users were educated about the security implications of pickle, but in hindsight we don't think users should be expected to secure their services if we have the ability to be secure by default.
By disabling any content type that the user did not explicitly want enabled we ensure that the user must be conscious when they add pickle as a serialization format to support.
The other built-in serializers (yaml and msgpack) are also disabled even though they aren't considered insecure [1] at this point. Instead they're disabled so that if a security flaw is found in one of these libraries in the future, you will only be affected if you have explicitly enabled them.
To have your consumer accept formats other than json you have to explicitly add the wanted formats to a white-list of accepted content types:
>>> c = Consumer(conn, accept=['json', 'pickle', 'msgpack'])or when using synchronous access:
>>> msg = queue.get(accept=['json', 'pickle', 'msgpack'])The accept argument was first supported for consumers in version 2.5.10, and first supported by Queue.get in version 2.5.15 so to stay compatible with previous versions you can enable the previous behavior:
>>> from kombu import enable_insecure_serializers >>> enable_insecure_serializers()But note that this has global effect, so be very careful should you use it.
Footnotes
[1]The PyYAML library has a yaml.load function with some of the same security implications as pickle, but Kombu uses the yaml.safe_load function which is not known to be affected.
kombu.async: Experimental event loop implementation.
This code was previously in Celery but was moved here to make it easier for async transport implementations.
The API is meant to match the Tulip API which will be included in Python 3.4 as the asyncio module. It's not a complete implementation obviously, but the goal is that it will be easy to change to it once that is possible.
Utility function kombu.common.ipublish has been removed.
Use Producer(..., retry=True) instead.
Utility function kombu.common.isend_reply has been removed
Use send_reply(..., retry=True) instead.
kombu.common.entry_to_queue and kombu.messaging.entry_to_queue has been removed.
Use Queue.from_dict(name, **options) instead.
Redis: Messages are now restored at the end of the list.
Contributed by Mark Lavin.
and amqp.ConnectionError and amqp.ChannelError is used instead.
Message object implementation has moved to kombu.message.Message.
Serailization: Renamed functions encode/decode to ~kombu.serialization.dumps and ~kombu.serialization.loads.
For backward compatibility the old names are still available as aliases.
The kombu.log.anon_logger function has been removed.
Use ~kombu.log.get_logger instead.
queue_declare now returns namedtuple with queue, message_count, and consumer_count fields.
LamportClock: Can now set lock class
kombu.utils.clock: Utilities for ordering events added.
~kombu.simple.SimpleQueue now allows you to override the exchange type used.
Contributed by Vince Gonzales.
Zookeeper transport updated to support new changes in the kazoo library.
Contributed by Mahendra M.
to the underlying connection (Issue #214).
Transports may now distinguish between recoverable and irrecoverable connection and channel errors.
kombu.utils.Finalize has been removed: Use multiprocessing.util.Finalize instead.
Memory transport now supports the fanout exchange type.
Contributed by Davanum Srinivas.
Experimental new Pyro transport (kombu.transport.pyro).
Contributed by Tommie McAfee.
Experimental new SoftLayer MQ transport (kombu.transport.SLMQ).
Contributed by Kevin McDonald
Eventio: Kqueue breaks in subtle ways so select is now used instead.
SQLAlchemy transport: Can now specify table names using the queue_tablename and message_tablename transport options.
Contributed by Ryan Petrello.
Redis server (Issue #1283)
To connect using a UNIX socket you have to use the redis+socket URL-prefix: redis+socket:///tmp/redis.sock.
This functionality was merged from the celery-redis-unixsocket project. Contributed by Maxime Rouyrre.
ZeroMQ transport: drain_events now supports timeout.
Contributed by Jesper Thomschütz.
:release-date: 2013-10-04 03:30 P.M BST :release-by: Ask Solem
Python 3: Fixed problem with dependencies not being installed.
:release-date: 2013-10-04 03:30 P.M BST :release-by: Ask Solem
Declaration cache: Now only keeps hash of declaration so that it does not keep a reference to the channel.
Declaration cache: Now respects entity.can_cache_declaration attribute.
Fixes Python 2.5 compatibility.
Fixes tests after python-msgpack changes.
Queue.get: Now supports accept argument.
:release-date: 2013-08-23 05:00 P.M BST :release-by: Ask Solem
safe_str did not work properly resulting in UnicodeDecodeError (Issue #248).
Tests no longer depends on distribute, which was deprecated and merged back into setuptools.
Now depends on amqp 1.0.13
Fixed typo in Django functional tests.
safe_str now returns Unicode in Python 2.x
Fix contributed by Germán M. Bravo.
amqp: Transport options are now merged with arguments supplied to the connection.
Tests no longer depends on distribute, which was deprecated and merged back into setuptools.
Fix contributed by Sascha Peilicke.
ConsumerMixin now also restarts on channel related errors.
Fix contributed by Corentin Ardeois.
:release-date: 2013-06-28 03:30 P.M BST :release-by: Ask Solem
Redis: Ignore errors about keys missing in the round-robin cycle.
Fixed test suite errors on Python 3.
Fixed msgpack test failures.
:release-date: 2013-06-25 02:30 P.M BST :release-by: Ask Solem
Now depends on amqp 1.0.12 (Py3 compatibility issues).
MongoDB: Removed cause of a "database name in URI is being ignored" warning.
Fix by Flavio Percoco Premoli
Adds passive option to ~kombu.Exchange.
Setting this flag means that the exchange will not be declared by kombu, but that it must exist already (or an exception will be raised).
Contributed by Rafal Malinowski
Connection.info() now gives the current hostname and not the list of available hostnames.
Fix contributed by John Shuping.
pyamqp: Transport options are now forwarded as kwargs to amqp.Connection.
librabbitmq: Transport options are now forwarded as kwargs to librabbitmq.Connection.
librabbitmq: Now raises NotImplementedError if SSL is enabled.
The librabbitmq library does not support ssl, but you can use stunnel or change to the pyamqp:// transport instead.
Fix contributed by Dan LaMotte.
librabbitmq: Fixed a cyclic reference at connection close.
eventio: select implementation now removes bad file descriptors.
eventio: Fixed Py3 compatibility problems.
Functional tests added for py-amqp and librabbitmq transports.
Resource.force_close_all no longer uses a mutex.
Pidbox: Now ignores IconsistencyError when sending replies, as this error simply means that the client may no longer be alive.
Adds new Connection.collect method, that can be used to clean up after connections without I/O.
queue_bind is no longer called for queues bound to the "default exchange" (Issue #209).
Contributed by Jonathan Halcrow.
The max_retries setting for retries was not respected correctly (off by one).
:release-date: 2013-04-11 06:10 P.M BST :release-by: Ask Solem
Kombu 3 consumers will no longer accept pickle/yaml or msgpack by default, and you will have to explicitly enable untrusted deserializers either globally using kombu.enable_insecure_serializers, or using the accept argument to ~kombu.Consumer.
New utility function to disable/enable untrusted serializers.
kombu.disable_insecure_serializers
kombu.enable_insecure_serializers.
Consumer: accept can now be used to specify a whitelist of content types to accept.
If the accept whitelist is set and a message is received with a content type that is not in the whitelist then a ~kombu.exceptions.ContentDisallowed exception is raised. Note that this error can be handled by the already existing on_decode_error callback
Examples:
Consumer(accept=['application/json']) Consumer(accept=['pickle', 'json'])
Now depends on amqp 1.0.11
pidbox: Mailbox now supports the accept argument.
Redis: More friendly error for when keys are missing.
Connection URLs: The parser did not work well when there were multiple '+' tokens.
Your coding agent can read these notes before it upgrades. Set up the MCP server →