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 4 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: 2013-04-08 05:07 P.M BST :release-by: Ask Solem
Pidbox: Now warns if there are multiple nodes consuming from the same pidbox.
Adds Queue.on_declared
A callback to be called when the queue is declared, with signature (name, messages, consumers).
Now uses fuzzy matching to suggest alternatives to typos in transport names.
SQS: Adds new transport option queue_prefix.
Contributed by j0hnsmith.
pyamqp: No longer overrides verify_connection.
SQS: Now specifies the driver_type and driver_name attributes.
Fix contributed by Mher Movsisyan.
Fixed bug with kombu.utils.retry_over_time when no errback specified.
:release-date: 2013-03-21 04:00 P.M UTC :release-by: Ask Solem
Now depends on amqp 1.0.10 which fixes a Python 3 compatibility error.
Redis: Fixed a possible race condition (Issue #171).
Redis: Ack emulation/visibility_timeout can now be disabled using a transport option.
Ack emulation adds quite a lot of overhead to ensure data is safe even in the event of an unclean shutdown. If data loss do not worry you there is now an ack_emulation transport option you can use to disable it:
Connection('redis://', transport_options={'ack_emulation': False})
SQS: Fixed boto v2.7 compatibility (Issue #207).
Exchange: Should not try to re-declare default exchange ("") (Issue #209).
SQS: Long polling is now disabled by default as it was not implemented correctly, resulting in long delays between receiving messages (Issue #202).
Fixed Python 2.6 incompatibility depending on exc.errno being available.
Fix contributed by Ephemera.
One column per quarter.
:release-date: 2013-03-08 01:00 P.M UTC :release-by: Ask Solem
Now depends on amqp 1.0.9
Redis: A regression in 2.5.6 caused the redis transport to ignore options set in transport_options.
Redis: New socket_timeout transport option.
Redis: InconsistencyError is now regarded as a recoverable error.
Resource pools: Will no longer attempt to release resource that was never acquired.
MongoDB: Now supports the ssl option.
Contributed by Sebastian Pawlus.
:release-date: 2013-02-08 01:00 P.M UTC :release-by: Ask Solem
Now depends on amqp 1.0.8 which works around a bug found on some Python 2.5 installations where 2**32 overflows to 0.
:release-date: 2013-02-07 05:00 P.M UTC :release-by: Ask Solem
SQS: Now supports long polling (Issue #176).
The polling interval default has been changed to 0 and a new transport option (wait_time_seconds) has been added. This parameter specifies how long to wait for a message from SQS, and defaults to 20 seconds, which is the maximum value currently allowed by Amazon SQS.
Contributed by James Saryerwinnie.
SQS: Now removes unpickleable fields before restoring messages.
Consumer.__exit__ now ignores exceptions occurring while canceling the consumer.
Virtual: Routing keys can now consist of characters also used in regular expressions (e.g. parens) (Issue #194).
Virtual: Fixed compression header when restoring messages.
Fix contributed by Alex Koshelev.
Virtual: ack/reject/requeue now works while using basic_get.
Virtual: Message.reject is now supported by virtual transports (requeue depends on individual transport support).
Fixed typo in hack used for static analyzers.
Fix contributed by Basil Mironenko.
:release-date: 2012-12-10 12:35 P.M UTC :release-by: Ask Solem
Fixed problem with connection clone and multiple URLs (Issue #182).
Fix contributed by Dane Guempel.
zeromq: Now compatible with libzmq 3.2.x.
Fix contributed by Andrey Antukh.
Fixed Python 3 installation problem (Issue #187).
:release-date: 2012-11-29 12:35 P.M UTC :release-by: Ask Solem
Pidbox: Fixed compatibility with Python 2.6
:release-date: 2012-11-29 12:35 P.M UTC :release-by: Ask Solem
:release-date: 2012-11-28 12:45 P.M UTC :release-by: Ask Solem
Fixed bug where return value of Queue.as_dict could not be serialized with JSON (Issue #177).
:release-date: 2012-11-27 04:00 P.M UTC :release-by: Ask Solem
`py-amqp`_ is now the new default transport, replacing amqplib.
The new `py-amqp`_ library is a fork of amqplib started with the following goals:
Uses AMQP 0.9.1 instead of 0.8
Support for heartbeats (Issue #79 + Issue #131)
Automatically revives channels on channel errors.
- Support for all RabbitMQ extensions
Consumer Cancel Notifications (Issue #131)
Publisher Confirms (Issue #131).
Exchange-to-exchange bindings: exchange_bind / exchange_unbind.
API compatible with librabbitmq so that it can be used as a pure-python replacement in environments where rabbitmq-c cannot be compiled. librabbitmq will be updated to support all the same features as py-amqp.
Support for using multiple connection URL's for failover.
The first argument to ~kombu.Connection can now be a list of connection URLs:
Connection(['amqp://foo', 'amqp://bar'])or it can be a single string argument with several URLs separated by semicolon:
Connection('amqp://foo;amqp://bar')There is also a new keyword argument failover_strategy that defines how ~kombu.Connection.ensure_connection/ ~kombu.Connection.ensure/kombu.Connection.autoretry will reconnect in the event of connection failures.
The default reconnection strategy is round-robin, which will simply cycle through the list forever, and there's also a shuffle strategy that will select random hosts from the list. Custom strategies can also be used, in that case the argument must be a generator yielding the URL to connect to.
Example:
Connection('amqp://foo;amqp://bar')
Now supports PyDev, PyCharm, pylint and other static code analysis tools.
~kombu.Queue now supports multiple bindings.
You can now have multiple bindings in the same queue by having the second argument be a list:
from kombu import binding, Queue Queue('name', [ binding(Exchange('E1'), routing_key='foo'), binding(Exchange('E1'), routing_key='bar'), binding(Exchange('E2'), routing_key='baz'), ])To enable this, helper methods have been added:
~kombu.Queue.bind_to
~kombu.Queue.unbind_from
Contributed by Rumyana Neykova.
Custom serializers can now be registered using Setuptools entry-points.
See serialization-entrypoints.
New kombu.common.QoS class used as a thread-safe way to manage changes to a consumer or channels prefetch_count.
This was previously an internal class used in Celery now moved to the kombu.common module.
Consumer now supports a on_message callback that can be used to process raw messages (not decoded).
Other callbacks specified using the callbacks argument, and the receive method will be not be called when a on message callback is present.
New utility kombu.common.ignore_errors ignores connection and channel errors.
Must only be used for cleanup actions at shutdown or on connection loss.
Support for exchange-to-exchange bindings.
The ~kombu.Exchange entity gained bind_to and unbind_from methods:
e1 = Exchange('A')(connection) e2 = Exchange('B')(connection) e2.bind_to(e1, routing_key='rkey', arguments=None) e2.unbind_from(e1, routing_key='rkey', arguments=None)This is currently only supported by the pyamqp transport.
Contributed by Rumyana Neykova.
:release-date: 2012-11-22 06:00 P.M UTC :release-by: Ask Solem
The previous versions connection pool changes broke Redis support so that it would always connect to localhost (default setting) no matter what connection parameters were provided (Issue #176).
:release-date: 2012-11-21 03:00 P.M UTC :release-by: Ask Solem
Redis: Fixed race condition that could occur while trying to restore messages (Issue #171).
Fix contributed by Ollie Walsh.
Redis: Each channel is now using a specific connection pool instance, which is disconnected on connection failure.
ProducerPool: Fixed possible dead-lock in the acquire method.
ProducerPool: force_close_all no longer tries to call the non-existent Producer._close.
librabbitmq: Now implements transport.verify_connection so that connection pools will not give back connections that are no longer working.
New and better repr() for Queue and Exchange objects.
Python 3: Fixed problem with running the unit test suite.
Python 3: Fixed problem with JSON codec.
:release-date: 2012-11-02 05:00 P.M UTC :release-by: Ask Solem
Redis: Improved fair queue cycle implementation (Issue #166).
Contributed by Kevin McCarthy.
Redis: Unacked message restore limit is now unlimited by default.
Also, the limit can now be configured using the unacked_restore_limit transport option:
Connection('redis://', transport_options={ 'unacked_restore_limit': 100, }) A limit of 100 means that the consumer will restore at most 100 messages at each pass.
Redis: Now uses a mutex to ensure only one consumer restores messages at a time.
The mutex expires after 5 minutes by default, but can be configured using the unacked_mutex_expire transport option.
LamportClock.adjust now returns the new clock value.
Heartbeats can now be specified in URLs.
Fix contributed by Mher Movsisyan.
Kombu can now be used with PyDev, PyCharm and other static analysis tools.
Fixes problem with msgpack on Python 3 (Issue #162).
Fix contributed by Jasper Bryant-Greene
amqplib: Fixed bug with timeouts when SSL is used in non-blocking mode.
Fix contributed by Mher Movsisyan
:release-date: 2012-09-18 03:00 P.M BST :release-by: Ask Solem
Virtual: Unknown exchanges now default to 'direct' when sending a message.
MongoDB: Fixed memory leak when merging keys stored in the db (Issue #159)
Fix contributed by Michael Korbakov.
MongoDB: Better index for MongoDB transport (Issue #158).
This improvement will create a new compund index for queue and _id in order to be able to use both indexed fields for getting a new message (using queue field) and sorting by _id. It'll be necessary to manually delete the old index from the collection.
Improvement contributed by rmihael
:release-date: 2012-09-12 03:00 P.M BST :release-by: Ask Solem
Adds additional compatibility dependencies:
Python <= 2.6:
importlib
ordereddict
Python <= 2.5
simplejson
:release-date: 2012-08-30 03:36 P.M BST :release-by: Ask Solem
Last version broke installtion on PyPy and Jython due to test requirements clean-up.
:release-date: 2012-08-29 04:00 P.M BST :release-by: Ask Solem
amqplib: Fixed a bug with asynchronously reading large messages.
pyamqp: Now requires amqp 0.9.3
Cleaned up test requirements.
:release-date: 2012-08-25 10:30 P.M BST :release-by: Ask Solem
Fixed problem with amqp transport alias (Issue #154).
:release-date: 2012-08-24 05:00 P.M BST :release-by: Ask Solem
Having an empty transport name broke in 2.4.1.
:release-date: 2012-08-24 04:00 P.M BST :release-by: Ask Solem
Redis: Fixed race condition that could cause the consumer to crash (Issue #151)
Often leading to the error message "could not convert string to float"
Connection retry could cause an inifite loop (Issue #145).
The amqp alias is now resolved at runtime, so that eventlet detection works even if patching was done later.
:release-date: 2012-08-17 08:00 P.M BST :release-by: Ask Solem
New experimental :mod:`ZeroMQ <kombu.transport.zmq` transport.
Contributed by John Watson.
Redis: Ack timed-out messages were not restored when using the eventloop.
Now uses pickle protocol 2 by default to be cross-compatible with Python 3.
The protocol can also now be changed using the PICKLE_PROTOCOL environment variable.
Adds Transport.supports_ev attribute.
Pika: Queue purge was not working properly.
Fix contributed by Steeve Morin.
Pika backend was no longer working since Kombu 2.3
Fix contributed by Steeve Morin.
:release-date: 2012-08-01 06:00 P.M BST :release-by: Ask Solem
Fixes problem with deserialization in Python 3.
:release-date: 2012-08-01 04:00 P.M BST :release-by: Ask Solem
librabbitmq: Can now handle messages that does not have a content_encoding/content_type set (Issue #149).
Fix contributed by C Anthony Risinger.
Beanstalk: Now uses localhost by default if the URL does not contain a host.
:release-date: 2012-07-24 03:50 P.M BST :release-by: Ask Solem
New pyamqp:// transport!
The new py-amqp library is a fork of amqplib started with the following goals:
Uses AMQP 0.9.1 instead of 0.8
Should support all RabbitMQ extensions
API compatible with librabbitmq so that it can be used as a pure-python replacement in environments where rabbitmq-c cannot be compiled.
If you start using use py-amqp instead of amqplib you can enjoy many advantages including:
Heartbeat support (Issue #79 + Issue #131)
Consumer Cancel Notifications (Issue #131)
Publisher Confirms
amqplib has not been updated in a long while, so maintaining our own fork ensures that we can quickly roll out new features and fixes without resorting to monkey patching.
To use the py-amqp transport you must install the amqp library:
$ pip install amqpand change the connection URL to use the correct transport:
>>> conn = Connection('pyamqp://guest:guest@localhost//')The pyamqp:// transport will be the default fallback transport in Kombu version 3.0, when librabbitmq is not installed, and librabbitmq will also be updated to support the same features.
Connection now supports heartbeat argument.
If enabled you must make sure to manually maintain heartbeats by calling the Connection.heartbeat_check at twice the rate of the specified heartbeat interval.
E.g. if you have Connection(heartbeat=10), then you must call Connection.heartbeat_check() every 5 seconds.
if the server has not sent heartbeats at a suitable rate then the heartbeat check method must raise an error that is listed in Connection.connection_errors.
The attribute Connection.supports_heartbeats has been added for the ability to inspect if a transport supports heartbeats or not.
Calling heartbeat_check on a transport that does not support heartbeats results in a noop operation.
SQS: Fixed bug with invalid characters in queue names.
Fix contributed by Zach Smith.
utils.reprcall: Fixed typo where kwargs argument was an empty tuple by default, and not an empty dict.
:release-date: 2012-07-10 05:00 P.M BST :release-by: Ask Solem
Adds kombu.messaging.entry_to_queue for compat with previous versions.
:release-date: 2012-07-10 05:00 P.M BST :release-by: Ask Solem
Pidbox: Now sets queue expire at 10 seconds for reply queues.
EventIO: Now ignores ValueError raised by epoll unregister.
MongoDB: Fixes Issue #142
Fix by Flavio Percoco Premoli
:release-date: 2012-07-05 04:00 P.M BST :release-by: Ask Solem
Support for msgpack-python 0.2.0 (Issue #143)
The latest msgpack version no longer supports Python 2.5, so if you're still using that you need to depend on an earlier msgpack-python version.
Fix contributed by Sebastian Insua
~kombu.common.maybe_declare no longer caches entities with the auto_delete flag set.
New experimental filesystem transport.
Contributed by Bobby Beever.
Virtual Transports: Now support anonymous queues and exchanges.
The Connection alias has been available since version 1.1.3, and BrokerConnection will still work and is not deprecated.
BrokerConnection now renamed to Connection.
The name Connection has been an alias for a very long time, but now the rename is official in the documentation as well.
The Connection alias has been available since version 1.1.3, and BrokerConnection will still work and is not deprecated.
Connection.clone() now works for the sqlalchemy transport.
kombu.common.eventloop, kombu.utils.uuid, and kombu.utils.url.parse_url can now be imported from the kombu module directly.
Pidbox transport callback after_reply_message_received now happens in a finally block.
Trying to use the librabbitmq:// transport will now show the right name in the ImportError if librabbitmq is not installed.
The librabbitmq falls back to the older pylibrabbitmq name for compatibility reasons and would therefore show No module named pylibrabbitmq instead of librabbitmq.
:release-date: 2012-06-22 02:30 P.M BST :release-by: Ask Solem
Now depends on anyjson 0.3.3
Json serializer: Now passes buffer objects directly, since this is supported in the latest anyjson version.
Fixes blocking epoll call if timeout was set to 0.
Fix contributed by John Watson.
setup.py now takes requirements from the requirements/ directory.
The distribution directory contrib/ is now renamed to extra/
:release-date: 2012-06-21 01:00 P.M BST :release-by: Ask Solem
SQS: Default visibility timeout is now 30 minutes.
Since we have ack emulation the visibility timeout is only in effect if the consumer is abrubtly terminated.
retry argument to Producer.publish now works properly, when the declare argument is specified.
Json serializer: didn't handle buffer objects (Issue #135).
Fix contributed by Jens Hoffrichter.
Virtual: Now supports passive argument to exchange_declare.
Exchange & Queue can now be bound to connections (which will use the default channel):
>>> exchange = Exchange('name') >>> bound_exchange = exchange(connection) >>> bound_exchange.declare()
SimpleQueue & SimpleBuffer can now be bound to connections (which will use the default channel).
Connection.manager.get_bindings now works for librabbitmq and pika.
Adds new transport info attributes:
Transport.driver_type
Type of underlying driver, e.g. "amqp", "redis", "sql".
Transport.driver_name
Name of library used e.g. "amqplib", "redis", "pymongo".
Transport.driver_version()
Version of underlying library.
:release-date: 2012-06-07 03:10 P.M BST :release-by: Ask Solem
The canonical source code repository has been moved to
Pidbox: Exchanges used by pidbox are no longer auto_delete.
Auto delete has been described as a misfeature, and therefore we have disabled it.
For RabbitMQ users old exchanges used by pidbox must be removed, these are named mailbox_name.pidbox, and reply.mailbox_name.pidbox.
The following command can be used to clean up these exchanges:
$ VHOST=/ URL=amqp:// python -c'import sys,kombu;[kombu.Connection( sys.argv[-1]).channel().exchange_delete(x) for x in sys.argv[1:-1]]' \ $(sudo rabbitmqctl -q list_exchanges -p "$VHOST" \ | grep \.pidbox | awk '{print $1}') "$URL"The VHOST variable must be set to the target RabbitMQ virtual host, and the URL must be the AMQP URL to the server.
The amqp transport alias will now use librabbitmq if installed.
py-librabbitmq is a fast AMQP client for Python using the librabbitmq C library.
It can be installed by:
$ pip install librabbitmqIt will not be used if the process is monkey patched by eventlet/gevent.
Redis: Ack emulation improvements.
Reducing the possibility of data loss.
Acks are now implemented by storing a copy of the message when the message is consumed. The copy is not removed until the consumer acknowledges or rejects it.
This means that unacknowledged messages will be redelivered either when the connection is closed, or when the visibility timeout is exceeded.
Visibility timeout
This is a timeout for acks, so that if the consumer does not ack the message within this time limit, the message is redelivered to another consumer.
The timeout is set to one hour by default, but can be changed by configuring a transport option:
>>> Connection('redis://', transport_options={ ... 'visibility_timeout': 1800, # 30 minutes ... })NOTE: Messages that have not been acked will be redelivered if the visibility timeout is exceeded, for Celery users this means that ETA/countdown tasks that are scheduled to execute with a time that exceeds the visibility timeout will be executed twice (or more). If you plan on using long ETA/countdowns you should tweak the visibility timeout accordingly:
BROKER_TRANSPORT_OPTIONS = {'visibility_timeout': 18000} # 5 hoursSetting a long timeout means that it will take a long time for messages to be redelivered in the event of a power failure, but if so happens you could temporarily set the visibility timeout lower to flush out messages when you start up the systems again.
Experimental Apache ZooKeeper transport
More information is in the module reference: kombu.transport.zookeeper.
Contributed by Mahendra M.
Redis: Priority support.
The message's priority field is now respected by the Redis transport by having multiple lists for each named queue. The queues are then consumed by in order of priority.
The priority field is a number in the range of 0 - 9, where 0 is the default and highest priority.
The priority range is collapsed into four steps by default, since it is unlikely that nine steps will yield more benefit than using four steps. The number of steps can be configured by setting the priority_steps transport option, which must be a list of numbers in sorted order:
>>> x = Connection('redis://', transport_options={ ... 'priority_steps': [0, 2, 4, 6, 8, 9], ... })Priorities implemented in this way is not as reliable as priorities on the server side, which is why nickname the feature "quasi-priorities"; Using routing is still the suggested way of ensuring quality of service, as client implemented priorities fall short in a number of ways, e.g. if the worker is busy with long running tasks, has prefetched many messages, or the queues are congested.
Still, it is possible that using priorities in combination with routing can be more beneficial than using routing or priorities alone. Experimentation and monitoring should be used to prove this.
Contributed by Germán M. Bravo.
Redis: Now cycles queues so that consuming is fair.
This ensures that a very busy queue won't block messages from other queues, and ensures that all queues have an equal chance of being consumed from.
This used to be the case before, but the behavior was accidentally changed while switching to using blocking pop.
Redis: Auto delete queues that are bound to fanout exchanges is now deleted at channel.close.
amqplib: Refactored the drain_events implementation.
Pidbox: Now uses connection.default_channel.
Pickle serialization: Can now decode buffer objects.
Exchange/Queue declarations can now be cached even if the entity is non-durable.
This is possible because the list of cached declarations are now kept with the connection, so that the entities will be redeclared if the connection is lost.
Kombu source code now only uses one-level of explicit relative imports.
eventio: Now ignores ENOENT raised by epoll.register, and EEXIST from epoll.unregister.
eventio: kqueue now ignores KeyError on unregister.
Redis: Message.reject now supports the requeue argument.
Redis: Remove superfluous pipeline call.
Fix contributed by Thomas Johansson.
Redis: Now sets redelivered header for redelivered messages.
Now always makes sure references to sys.exc_info is removed.
Virtual: The compression header is now removed before restoring messages.
More tests for the SQLAlchemy backend.
Contributed by Franck Cuny.
Url parsing did not handle MongoDB URLs properly.
Fix contributed by Flavio Percoco Premoli.
Beanstalk: Ignore default tube when reserving.
Fix contributed by Zhao Xiaohong.
librabbitmq, amqplib and redis transports can now be used non-blocking.
The interface is very manual, and only consuming messages is non-blocking so far.
The API should not be regarded as stable or final in any way. It is used by Celery which has very limited needs at this point. Hopefully we can introduce a proper callback-based API later.
Transport.eventmap
Is a map of fd -> callback(fileno, event) to register in an eventloop.
Transport.on_poll_start()
Is called before every call to poll. The poller must support register(fd, callback) and unregister(fd) methods.
Transport.on_poll_start(poller)
Called when the hub is initialized. The poller argument must support the same interface as kombu.utils.eventio.poll.
Connection.ensure_connection now takes a callback argument which is called for every loop while the connection is down.
Adds connection.drain_nowait
This is a non-blocking alternative to drain_events, but only supported by amqplib/librabbitmq.
drain_events now sets connection.more_to_read if there is more data to read.
This is to support eventloops where other things must be handled between draining events.
:release-date: 2012-05-06 03:06 P.M BST :release-by: Ask Solem
Bound Exchange/Queue's are now pickleable.
Consumer/Producer can now be instantiated without a channel, and only later bound using .revive(channel).
ProducerPool now takes Producer argument.
~kombu.utils.fxrange now counts forever if the stop argument is set to None. (fxrange is like xrange but for decimals).
Auto delete support for virtual transports were incomplete and could lead to problems so it was removed.
Cached declarations (~kombu.common.maybe_declare) are now bound to the underlying connection, so that entities are redeclared if the connection is lost.
This also means that previously uncacheable entities (e.g. non-durable) can now be cached.
compat ConsumerSet: can now specify channel.
:release-date: 2012-04-27 06:00 P.M BST :release-by: Ask Solem
compat consumerset now accepts optional channel argument.
:release-date: 2012-04-23 01:30 P.M BST :release-by: Ask Solem
SQLAlchemy transport was not working correctly after URL parser change.
maybe_declare now stores cached declarations per underlying connection instead of globally, in the rare case that data disappears from the broker after connection loss.
Django: Added South migrations.
Contributed by Joseph Crosland.
:release-date: 2012-04-13 03:30 P.M BST :release-by: Ask Solem
The url parser removed more than the first leading slash (Issue #121).
SQLAlchemy: Can now specify url using + separator
Example:
Connection('sqla+mysql://localhost/db')
Better support for anonymous queues (Issue #116).
Contributed by Michael Barrett.
Connection.as_uri now quotes url parts (Issue #117).
Beanstalk: Can now set message TTR as a message property.
Contributed by Andrii Kostenko
:release-date: 2012-04-03 04:00 P.M GMT :release-by: Ask Solem
MongoDB: URL parsing are now delegated to the pymongo library (Fixes Issue #103 and Issue #87).
Fix contributed by Flavio Percoco Premoli and James Sullivan
SQS: A bug caused SimpleDB to be used even if sdb persistence was not enabled (Issue #108).
Fix contributed by Anand Kumria.
Django: Transaction was committed in the wrong place, causing data cleanup to fail (Issue #115).
Fix contributed by Daisuke Fujiwara.
MongoDB: Now supports replica set URLs.
Contributed by Flavio Percoco Premoli.
Redis: Now raises a channel error if a queue key that is currently being consumed from disappears.
Fix contributed by Stephan Jaekel.
All transport 'channel_errors' lists now includes kombu.exception.StdChannelError.
All kombu exceptions now inherit from a common ~kombu.exceptions.KombuError.
:release-date: 2012-03-20 03:00 P.M GMT :release-by: Ask Solem
Fixes Jython compatibility issues.
Fixes Python 2.5 compatibility issues.
:release-date: 2012-03-01 01:00 P.M GMT :release-by: Ask Solem
amqplib: Last version broke SSL support.
:release-date: 2012-02-24 02:00 P.M GMT :release-by: Ask Solem
Connection URLs now supports encoded characters.
Fixed a case where connection pool could not recover from connection loss.
Fix contributed by Florian Munz.
We now patch amqplib's __del__ method to skip trying to close the socket if it is not connected, as this resulted in an annoying warning.
Compression can now be used with binary message payloads.
Fix contributed by Steeve Morin.
:release-date: 2012-02-04 10:38 P.M GMT :release-by: Ask Solem
MongoDB: Now supports fanout (broadcast) (Issue #98).
Contributed by Scott Lyons.
amqplib: Now detects broken connections by using MSG_PEEK.
pylibrabbitmq: Now supports basic_get (Issue #97).
gevent: Now always uses the select polling backend.
pika transport: Now works with pika 0.9.5 and 0.9.6dev.
The old pika transport (supporting 0.5.x) is now available as alias oldpika.
(Note terribly latency has been experienced with the new pika versions, so this is still an experimental transport).
Virtual transports: can now set polling interval via the transport options (Issue #96).
Example:
>>> Connection('sqs://', transport_options={ ... 'polling_interval': 5.0})The default interval is transport specific, but usually 1.0s (or 5.0s for the Django database transport, which can also be set using the KOMBU_POLLING_INTERVAL setting).
Adds convenience function: kombu.common.eventloop.
:release-date: 2012-01-15 06:34 P.M GMT :release-by: Ask Solem
No longer supports Python 2.4.
Users of Python 2.4 can still use the 1.x series.
The 1.x series has entered bugfix-only maintenance mode, and will stay that way as long as there is demand, and a willingness to maintain it.
django-kombu is now part of Kombu core.
The Django message transport uses the Django ORM to store messages.
It uses polling, with a default polling interval of 5 seconds. The polling interval can be increased or decreased by configuring the KOMBU_POLLING_INTERVAL Django setting, which is the polling interval in seconds as an int or a float. Note that shorter polling intervals can cause extreme strain on the database: if responsiveness is needed you shall consider switching to a non-polling transport.
To use it you must use transport alias "django", or as a URL:
django://and then add kombu.transport.django to INSTALLED_APPS, and run manage.py syncdb to create the necessary database tables.
Upgrading
If you have previously used django-kombu, then the entry in INSTALLED_APPS must be changed from djkombu to kombu.transport.django:
INSTALLED_APPS = ( # …, 'kombu.transport.django', )If you have previously used django-kombu, then there is no need to recreate the tables, as the old tables will be fully compatible with the new version.
kombu-sqlalchemy is now part of Kombu core.
This change requires no code changes given that the sqlalchemy transport alias is used.
kombu.mixins.ConsumerMixin is a mixin class that lets you easily write consumer programs and threads.
See examples and guide-consumers.
SQS Transport: Added support for SQS queue prefixes (Issue #84).
The queue prefix can be set using the transport option queue_name_prefix:
BrokerTransport('SQS://', transport_options={ 'queue_name_prefix': 'myapp'})Contributed by Nitzan Miron.
Producer.publish now supports automatic retry.
Retry is enabled by the reply argument, and retry options set by the retry_policy argument:
exchange = Exchange('foo') producer.publish(message, exchange=exchange, retry=True, declare=[exchange], retry_policy={ 'interval_start': 1.0})See ~kombu.Connection.ensure for a list of supported retry policy options.
Producer.publish now supports a declare keyword argument.
This is a list of entities (Exchange, or Queue) that should be declared before the message is published.
Redis transport: Timeout was multiplied by 1000 seconds when using select for event I/O (Issue #86).
:release-date: 2011-11-30 01:00 P.M GMT :release-by: Ask Solem
Fixes issue with kombu.compat introduced in 1.5.0 (Issue #83).
Adds the ability to disable content_types in the serializer registry.
Any message with a content type that is disabled will be refused. One example would be to disable the Pickle serializer:
>>> from kombu.serialization import registry # by name >>> registry.disable('pickle') # or by mime-type. >>> registry.disable('application/x-python-serialize')
:release-date: 2011-11-27 06:00 P.M GMT :release-by: Ask Solem
kombu.pools: Fixed a bug resulting in resources not being properly released.
This was caused by the use of __hash__ to distinguish them.
Virtual transports: Dead-letter queue is now disabled by default.
The dead-letter queue was enabled by default to help application authors, but now that Kombu is stable it should be removed. There are after all many cases where messages should just be dropped when there are no queues to buffer them, and keeping them without supporting automatic cleanup is rather considered a resource leak than a feature.
If wanted the dead-letter queue can still be enabled, by using the deadletter_queue transport option:
>>> x = Connection('redis://', ... transport_options={'deadletter_queue': 'ae.undeliver'})In addition, an UndeliverableWarning is now emitted when the dead-letter queue is enabled and a message ends up there.
Contributed by Ionel Maries Cristian.
MongoDB transport now supports Replicasets (Issue #81).
Contributed by Ivan Metzlar.
The Connection.ensure methods now accepts a max_retries value of 0.
A value of 0 now means do not retry, which is distinct from None which means retry indefinitely.
Contributed by Dan McGee.
SQS Transport: Now has a lowercase sqs alias, so that it can be used with broker URLs (Issue #82).
Fix contributed by Hong Minhee
SQS Transport: Fixes KeyError on message acknowledgments (Issue #73).
The SQS transport now uses UUID's for delivery tags, rather than a counter.
Fix contributed by Brian Bernstein.
SQS Transport: Unicode related fixes (Issue #82).
Fix contributed by Hong Minhee.
Redis version check could crash because of improper handling of types (Issue #63).
Fixed error with Resource.force_close_all when resources were not yet properly initialized (Issue #78).
:release-date: 2011-10-27 10:00 P.M BST :release-by: Ask Solem
Fixes bug in ProducerPool where too many resources would be acquired.
:release-date: 2011-10-26 05:00 P.M BST :release-by: Ask Solem
Eventio: Polling should ignore errno.EINTR
SQS: str.encode did only start accepting kwargs after Py2.7.
simple_task_queue example didn't run correctly (Issue #72).
Fix contributed by Stefan Eletzhofer.
Empty messages would not raise an exception not able to be handled by on_decode_error (Issue #72)
Fix contributed by Christophe Chauvet.
CouchDB: Properly authenticate if user/password set (Issue #70)
Fix contributed by Rafael Duran Castaneda
Connection.Consumer had the wrong signature.
Fix contributed by Pavel Skvazh
:release-date: 2011-09-26 04:00 P.M BST :release-by: Ask Solem
1.4.0 broke the producer pool, resulting in new connections being established for every acquire.
:release-date: 2011-09-22 05:00 P.M BST :release-by: Ask Solem
Adds module kombu.mixins.
This module contains a ~kombu.mixins.ConsumerMixin class that can be used to easily implement a message consumer thread that consumes messages from one or more kombu.Consumer instances.
New example: task-queue-example
Using the ConsumerMixin, default channels and the global connection pool to demonstrate new Kombu features.
MongoDB transport did not work with MongoDB >= 2.0 (Issue #66)
Fix contributed by James Turk.
Redis-py version check did not account for beta identifiers in version string.
Fix contributed by David Ziegler.
Producer and Consumer now accepts a connection instance as the first argument.
The connections default channel will then be used.
In addition shortcut methods has been added to Connection:
>>> connection.Producer(exchange) >>> connection.Consumer(queues=..., callbacks=...)
Connection has aquired a connected attribute that can be used to check if the connection instance has established a connection.
ConnectionPool.acquire_channel now returns the connections default channel rather than establising a new channel that must be manually handled.
Added kombu.common.maybe_declare
maybe_declare(entity) declares an entity if it has not previously been declared in the same process.
kombu.compat.entry_to_queue has been moved to kombu.common
New module kombu.clocks now contains an implementation of Lamports logical clock.
:release-date: 2011-09-16 06:00 P.M BST :release-by: Ask Solem
Python 3: AMQP_PROTOCOL_HEADER must be bytes, not str.
:release-date: 2011-09-16 06:00 P.M BST :release-by: Ask Solem
Fixes syntax error in pools.reset
:release-date: 2011-09-15 02:00 P.M BST :release-by: Ask Solem
pools.reset did not support after forker arguments.
:release-date: 2011-09-10 01:00 P.M BST :release-by: Mher Movsisyan
Broke Python 2.5 compatibility by importing parse_qsl from urlparse
Connection.default_channel is now closed when connection is revived after connection failures.
Pika: Channel now supports the connection.client attribute as required by the simple interface.
pools.set_limit now raises an exception if the limit is lower than the previous limit.
pools.set_limit no longer resets the pools.
:release-date: 2011-10-07 03:00 P.M BST :release-by: Ask Solem
Last release broke after fork for pool reinitialization.
Producer/Consumer now has a connection attribute, giving access to the Connection of the instance.
Pika: Channels now have access to the underlying Connection instance using channel.connection.client.
This was previously required by the Simple classes and is now also required by Consumer and Producer.
Connection.default_channel is now closed at object revival.
Adds kombu.clocks.LamportClock.
compat.entry_to_queue has been moved to new module kombu.common.
:release-date: 2011-10-05 01:00 P.M BST :release-by: Ask Solem
Broker connection info can be now be specified using URLs
The broker hostname can now be given as a URL instead, of the format:
transport://user:password@hostname:port/virtual_hostfor example the default broker is expressed as:
>>> Connection('amqp://guest:guest@localhost:5672//')Transport defaults to amqp, and is not required. user, password, port and virtual_host is also not mandatory and will default to the corresponding transports default.
Note
Note that the path component (virtual_host) always starts with a forward-slash. This is necessary to distinguish between the virtual host '' (empty) and '/', which are both acceptable virtual host names.
A virtual host of '/' becomes:
.. code-block:: textamqp://guest:guest@localhost:5672//
and a virtual host of '' (empty) becomes:
amqp://guest:guest@localhost:5672/So the leading slash in the path component is always required.
Now comes with default global connection and producer pools.
The acquire a connection using the connection parameters from a Connection:
>>> from kombu import Connection, connections >>> connection = Connection('amqp://guest:guest@localhost//') >>> with connections[connection].acquire(block=True): ... # do something with connectionTo acquire a producer using the connection parameters from a Connection:
>>> from kombu import Connection, producers >>> connection = Connection('amqp://guest:guest@localhost//') >>> with producers[connection].acquire(block=True): ... producer.publish({'hello': 'world'}, exchange='hello')Acquiring a producer will in turn also acquire a connection from the associated pool in connections, so you the number of producers is bound the same limit as number of connections.
The default limit of 100 connections per connection instance can be changed by doing:
>>> from kombu import pools >>> pools.set_limit(10)The pool can also be forcefully closed by doing:
>>> from kombu import pools >>> pool.reset()
SQS Transport: Persistence using SimpleDB is now disabled by default, after reports of unstable SimpleDB connections leading to errors.
Producer can now be used as a context manager.
Producer.__exit__ now properly calls release instead of close.
The previous behavior would lead to a memory leak when using the kombu.pools.ProducerPool
Now silences all exceptions from import ctypes to match behaviour of the standard Python uuid module, and avoid passing on MemoryError exceptions on SELinux-enabled systems (Issue #52 + Issue #53)
amqp is now an alias to the amqplib transport.
kombu.syn.detect_environment now returns 'default', 'eventlet', or 'gevent' depending on what monkey patches have been installed.
Serialization registry has new attribute type_to_name so it is possible to lookup serializater name by content type.
Exchange argument to Producer.publish can now be an Exchange instance.
compat.Publisher now supports the channel keyword argument.
Acking a message on some transports could lead to KeyError being raised (Issue #57).
Connection pool: Connections are no long instantiated when the pool is created, but instantiated as needed instead.
Tests now pass on PyPy.
Connection.as_uri now includes the password if the keyword argument include_password is set.
Virtual transports now comes with a default default_connection_params attribute.
:release-date: 2011-07-29 12:52 P.M BST :release-by: Ask Solem
Now depends on amqplib >= 1.0.0.
Redis: Now automatically deletes auto_delete queues at basic_cancel.
serialization.unregister added so it is possible to remove unwanted seralizers.
Fixes MemoryError while importing ctypes on SELinux (Issue #52).
Connection.autoretry is a version of ensure that works with arbitrary functions (i.e. it does not need an associated object that implements the revive method.
Example usage:
channel = connection.channel()
try:
ret, channel = connection.autoretry(send_messages, channel=channel)
finally:
channel.close()
ConnectionPool.acquire no longer force establishes the connection.
The connection will be established as needed.
Connection.ensure now supports an on_revive callback that is applied whenever the connection is re-established.
Consumer.consuming_from(queue) returns True if the Consumer is consuming from queue.
Consumer.cancel_by_queue did not remove the queue from queues.
compat.ConsumerSet.add_queue_from_dict now automatically declared the queue if auto_declare set.
:release-date: 2011-07-15 12:00 P.M BST :release-by: Ask Solem
Virtual: Fixes cyclic reference in Channel.close (Issue #49).
Producer.publish: Can now set additional properties using keyword arguments (Issue #48).
Adds Queue.no_ack option to control the no_ack option for individual queues.
Recent versions broke pylibrabbitmq support.
SimpleQueue and SimpleBuffer can now be used as contexts.
Test requirements specifies PyYAML==3.09 as 3.10 dropped Python 2.4 support
Now properly reports default values in Connection.info/.as_uri
:release-date: 2011-06-13 04:00 P.M BST :release-by: Ask Solem
Redis: Fixes issue introduced in 1.1.4, where a redis connection failure could leave consumer hanging forever.
SQS: Now supports fanout messaging by using SimpleDB to store routing tables.
This can be disabled by setting the supports_fanout transport option:
>>> Connection(transport='SQS', ... transport_options={'supports_fanout': False})
SQS: Now properly deletes a message when a message is acked.
SQS: Can now set the Amazon AWS region, by using the region transport option.
amqplib: Now uses localhost as default hostname instead of raising an error.
:release-date: 2011-06-07 06:00 P.M BST :release-by: Ask Solem
Fixes compatibility with redis-py 2.4.4.
:release-date: 2011-06-07 04:00 P.M BST :release-by: Ask Solem
Redis transport: Now requires redis-py version 2.4.4 or later.
New Amazon SQS transport added.
Usage:
>>> conn = Connection(transport='SQS', ... userid=aws_access_key_id, ... password=aws_secret_access_key)The environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are also supported.
librabbitmq transport: Fixes default credentials support.
amqplib transport: Now supports login_method for SSL auth.
Connection now supports the login_method keyword argument.
Default login_method is AMQPLAIN.
:release-date: 2011-04-21 04:00 P.M CEST :release-by: Ask Solem
Redis: Consuming from multiple connections now works with Eventlet.
Redis: Can now perform channel operations while the channel is in BRPOP/LISTEN mode (Issue #35).
Also the async BRPOP now times out after 1 second, this means that canceling consuming from a queue/starting consuming from additional queues has a latency of up to one second (BRPOP does not support subsecond timeouts).
Virtual: Allow channel objects to be closed multiple times without error.
amqplib: AttributeError has been added to the list of known connection related errors (Connection.connection_errors).
amqplib: Now converts SSLError timeout errors to socket.timeout (http://bugs.python.org/issue10272)
Ensures cyclic references are destroyed when the connection is closed.
:release-date: 2011-04-06 04:00 P.M CEST :release-by: Ask Solem
Redis: Fixes serious issue where messages could be lost.
The issue could happen if the message exceeded a certain number of kilobytes in size.
It is recommended that all users of the Redis transport should upgrade to this version, even if not currently experiencing any issues.
Your coding agent can read these notes before it upgrades. Set up the MCP server →