forked from celery/kombu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Changelog
4440 lines (2796 loc) · 118 KB
/
Changelog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.. _changelog:
================
Change history
================
.. _version-4.6.5:
4.6.5
=====
:release-date: 2019-09-30 19:30 P.M UTC+6:00
:release-by: Asif Saif Uddin
- Revert _lookup api and correct redis implemetnation.
- Major overhaul of redis test cases by adding more full featured fakeredis module.
- Add more test cases to boost coverage of kombu redis transport.
- Refactor the producer consumer test cases to be based on original mocks and be passing
- Fix lingering line length issue in test.
- Sanitise url when include_password is false
- Pinned pycurl to 7.43.0.2 as it is the latest build with wheels provided
- Bump py-amqp to 2.5.2
.. _version-4.6.4:
4.6.4
=====
:release-date: 2019-08-14 22:45 P.M UTC+6:00
:release-by: Asif Saif Uddin
- Use importlib-metadata instead of pkg_resources for better performance
- Allow users to switch URLs while omitting the resource identifier (#1032)
- Don't stop receiving tasks on 503 SQS error. (#1064)
- Fix maybe declare (#1066)
- Revert "Revert "Use SIMEMBERS instead of SMEMBERS to check for queue (Redis Broker)
- Fix MongoDB backend to work properly with TTL (#1076)
- Make sure that max_retries=0 is treated differently than None (#1080)
- Bump py-amqp to 2.5.1
.. _version-4.6.3:
4.6.3
=====
:release-date: 2019-06-15 12:45 A.M UTC+6:00
:release-by: Asif Saif Uddin
- Revert FastUUID for kombu 4.6
.. _version-4.6.2:
4.6.2
=====
:release-date: 2019-06-15 12:45 A.M UTC+6:00
:release-by: Asif Saif Uddin
- Fix sbugs and regressions
.. _version-4.6.1:
4.6.1
=====
:release-date: 2019-06-06 10:30 A.M UTC+6:00
:release-by: Asif Saif Uddin
- Fix some newly introduced bug in kombu 4.6
.. _version-4.6.0:
4.6.0
=====
:release-date: 2019-05-30 15:30 P.M UTC+6:00
:release-by: Asif Saif Uddin
-
.. _version-4.5.0:
4.5.0
=====
: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:
.. code-block:: python
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 <https://github.com/celery/kombu/pull/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`:
.. code-block:: pycon
>>> 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**
.. _version-4.4.0:
4.4.0
=====
: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 <https://github.com/celery/kombu/pull/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 <https://github.com/celery/kombu/pull/954>`_.
Instead bump the required redis-py dependency to 3.2.0
to include this fix `andymccurdy/redis-py@4e1e748 <https://github.com/andymccurdy/redis-py/commit/4e1e74809235edc19e03edb79c97c80a3e4e9eca>`_.
Contributed by **Peter Lithammer**
- Added support for broadcasting using a regular expression pattern
or a glob pattern to multiple Pidboxes.
Contributed by **Jason Held**
.. _version-4.3.0:
4.3.0
=====
: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 :func:`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 (:mod:`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`**
.. _version-4.2.2-post1:
4.2.2-post1
===========
: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.
.. _version-4.2.2:
4.2.2
=====
:release-date: 2018-12-06 04:30 P.M IST
:release-by: Omer Katz
- Support both Redis client version 2.x and version 3.x.
Contributed by **Ash Berlin-Taylor** and **Jeppe Fihl-Pearson**
.. _version-4.2.1:
4.2.1
=====
: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**
.. _version-4.2.0:
4.2.0
=====
: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
:meth:`~kombu.Connection.ensure_connection` when returning
:meth:`~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**
.. _version-4.1.0:
4.1.0
=====
:release-date: 2017-07-17 04:45 P.M MST
:release-by: Anthony Lukach
- 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 :pypi:`boto3` (no longer using
:pypi:`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 :meth:`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 :exc:`EtcdException` exception rather than
:exc:`EtcdError`.
Contributed by **Stephen Milner**.
- Documentation improvements by:
- **Mads Jensen**
- **Matias Insaurralde**
- **Omer Katz**
- **Dmitry Dygalo**
- **Christopher Hoskin**
.. _version-4.0.2:
4.0.2
=====
:release-date: 2016-12-15 03:31 P.M PST
:release-by: Ask Solem
- Now depends on :mod:`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.
.. _version-4.0.1:
4.0.1
=====
:release-date: 2016-12-07 06:00 P.M PST
:release-by: Ask Solem
- Now depends on :mod:`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**
.. _version-4.0:
4.0
===
:release-date: 2016-10-28 16:45 P.M UTC
:release-by: Ask Solem
- Now depends on :mod:`amqp` 2.0.
The new py-amqp version have been refactored for better performance,
using modern Python socket conventions, and API consistency.
- No longer depends on :mod:`anyjson`.
Kombu will now only choose between :pypi:`simplejson` and the built-in
:mod:`json`.
Using the latest version of simplejson is recommended:
.. code-block:: console
$ pip install -U simplejson
- Removed transports that are no longer supported in this version:
- Django ORM transport
- SQLAlchemy ORM transport
- Beanstalk transport
- ZeroMQ transport
- amqplib transport (use pyamqp).
- API Changes
* Signature of :class:`kombu.Message` now takes body as first argment.
It used to be ``Message(channel, body=body, **kw)``, but now it's
``Message(body, channel=channel, **kw)``.
This is unlikey to affect you, as the Kombu API does not have
users instantiate messages manually.
- New SQS transport
Donated by NextDoor, with additional contributions from mdk.
.. note::
``kombu[sqs]`` now depends on :pypi:`pycurl`.
- New Consul transport.
Contributed by **Wido den Hollander**.
- New etcd transport.
Contributed by **Stephen Milner**.
- New Qpid transport.
It was introduced as an experimental transport in Kombu 3.0, but is now
mature enough to be fully supported.
Created and maintained by **Brian Bouterse**.
- Redis: Priority 0 is now lowest, 9 is highest.
(**backward incompatible**)
This to match how priorities in AMQP works.
Fix contributed by **Alex Koshelev**.
- Redis: Support for Sentinel
You can point the connection to a list of sentinel URLs like:
.. code-block:: text
sentinel://0.0.0.0:26379;sentinel://0.0.0.0:26380/...
where each sentinel is separated by a `;`. Multiple sentinels are handled
by :class:`kombu.Connection` constructor, and placed in the alternative
list of servers to connect to in case of connection failure.
Contributed by **Sergey Azovskov**, and **Lorenzo Mancini**
- RabbitMQ Queue Extensions
New arguments have been added to :class:`kombu.Queue` that lets
you directly and conveniently configure the RabbitMQ queue extensions.
- ``Queue(expires=20.0)``
Set queue expiry time in float seconds.
See :attr:`kombu.Queue.expires`.
- ``Queue(message_ttl=30.0)``
Set queue message time-to-live float seconds.
See :attr:`kombu.Queue.message_ttl`.
- ``Queue(max_length=1000)``
Set queue max length (number of messages) as int.
See :attr:`kombu.Queue.max_length`.
- ``Queue(max_length_bytes=1000)``
Set queue max length (message size total in bytes) as int.
See :attr:`kombu.Queue.max_length_bytes`.
- ``Queue(max_priority=10)``
Declare queue to be a priority queue that routes messages
based on the ``priority`` field of the message.
See :attr:`kombu.Queue.max_priority`.
- RabbitMQ: ``Message.ack`` now supports the ``multiple`` argument.
If multiple is set to True, then all messages received before
the message being acked will also be acknowledged.
- ``amqps://`` can now be specified to require SSL (Issue #610).
- ``Consumer.cancel_by_queue`` is now constant time.
- ``Connection.ensure*`` now raises :exc:`kombu.exceptions.OperationalError`.
Things that can be retried are now reraised as
:exc:`kombu.exceptions.OperationalError`.
- Redis: Fixed SSL support.
Contributed by **Robert Kolba**.
- New ``Queue.consumer_arguments`` can be used for the ability to
set consumer priority via ``x-priority``.
See https://www.rabbitmq.com/consumer-priority.html
Example:
.. code-block:: python
Queue(
'qname',
exchange=Exchange('exchange'),
routing_key='qname',
consumer_arguments={'x-priority': 3},
)
- Queue/Exchange: ``no_declare`` option added (also enabled for
internal amq. exchanges) (Issue #565).
- JSON serializer now calls ``obj.__json__`` for unsupported types.
This means you can now define a ``__json__`` method for custom
types that can be reduced down to a built-in json type.
Example:
.. code-block:: python
class Person:
first_name = None
last_name = None
address = None
def __json__(self):
return {
'first_name': self.first_name,
'last_name': self.last_name,
'address': self.address,
}
- JSON serializer now handles datetimes, Django promise, UUID and Decimal.
- Beanstalk: Priority 0 is now lowest, 9 is highest.
(**backward incompatible**)
This to match how priorities in AMQP works.
Fix contributed by **Alex Koshelev**.
- Redis: now supports SSL using the ``ssl`` argument to
:class:`~kombu.Connection`.
- Redis: Fanout exchanges are no longer visible between vhosts,
and fanout messages can be filtered by patterns.
(**backward incompatible**)
It was possible to enable this mode previously using the
``fanout_prefix``, and ``fanout_patterns``
transport options, but now these are enabled by default.
If you want to mix and match producers/consumers running different
versions you need to configure your kombu 3.x clients to also enable
these options:
.. code-block:: pycon
>>> Connection(transport_options={
'fanout_prefix': True,
'fanout_patterns': True,
})
- Pidbox: Mailbox new arguments: TTL and expiry.
Mailbox now supports new arguments for controlling
message TTLs and queue expiry, both for the mailbox
queue and for reply queues.
- ``queue_expires`` (float/int seconds).
- ``queue_ttl`` (float/int seconds).
- ``reply_queue_expires`` (float/int seconds).
- ``reply_queue_ttl`` (float/int seconds).
All take seconds in int/float.
Contributed by **Alan Justino**.
- Exchange.delivery_mode now defaults to :const:`None`, and the default
is instead set by ``Producer.publish``.
- :class:`~kombu.Consumer` now supports a new ``prefetch_count`` argument,
which if provided will force the consumer to set an initial prefetch count
just before starting.
- Virtual transports now stores ``priority`` as a property, not in
``delivery_info``, to be compatible with AMQP.
- ``reply_to`` argument to ``Producer.publish`` can now be
:class:`~kombu.Queue` instance.
- Connection: There's now a new method
``Connection.supports_exchange_type(type)`` that can be used to check if the
current transport supports a specific exchange type.
- SQS: Consumers can now read json messages not sent by Kombu.
Contributed by **Juan Carlos Ferrer**.
- SQS: Will now log the access key used when authentication fails.
Contributed by **Hank John**.
- Added new :class:`kombu.mixins.ConsumerProducerMixin` for consumers that
will also publish messages on a separate connection.
- Messages: Now have a more descriptive ``repr``.
Contributed by **Joshua Harlow**.
- Async: HTTP client based on curl.
- Async: Now uses `poll` instead of `select` where available.
- MongoDB: Now supports priorities
Contributed by **Alex Koshelev**.
- Virtual transports now supports multiple queue bindings.
Contributed by **Federico Ficarelli**.
- Virtual transports now supports the anon exchange.
If when publishing a message, the exchange argument is set to '' (empty
string), the routing_key will be regarded as the destination queue.
This will bypass the routing table compeltely, and just deliver the
message to the queue name specified in the routing key.
- Zookeeper: Transport now uses the built-in suport in kazoo to handle
failover when using a list of server names.
Contributed by **Joshua Harlow**.
- ConsumerMixin.run now passes keyword arguments to .consume.
Deprecations and removals
-------------------------
- The deprecated method ``Consumer.add_queue_from_dict`` has been removed.
Use instead:
.. code-block:: python
consumer.add_queue(Queue.from_dict(queue_name, **options))
- The deprecated function ``kombu.serialization.encode`` has been removed.
Use :func:`kombu.serialization.dumps` instead.
- The deprecated function ``kombu.serialization.decode`` has been removed.
Use :func:`kombu.serialization.loads` instead.
- Removed module ``kombu.syn``
``detect_environment`` has been moved to kombu.utils.compat
.. _version-3.0.37:
3.0.37
======
: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).
.. _version-3.0.36:
3.0.36
======
: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.