Skip to content

Releases: dpkp/kafka-python

1.2.5

05 Aug 15:17
Compare
Choose a tag to compare

Bugfixes

  • Fix bug causing KafkaProducer to double-compress message batches on retry
  • Check for double-compressed messages in KafkaConsumer, log warning and optionally skip
  • Drop recursion in _unpack_message_set; only decompress once

1.2.4

05 Aug 15:18
Compare
Choose a tag to compare

Bugfixes

  • Update consumer_timeout_ms docstring - KafkaConsumer raises StopIteration, no longer ConsumerTimeout
  • Use explicit subscription state flag to handle seek() during message iteration
  • Fix consumer iteration on compacted topics (dpkp PR 752)
  • Support ssl_password config when loading cert chains (amckemie PR 750)

1.2.3

05 Aug 15:19
Compare
Choose a tag to compare

Patch Improvements

  • Fix gc error log: avoid AttributeError in _unregister_cleanup (dpkp PR 747)
  • Wakeup socket optimizations (dpkp PR 740)
  • Assert will be disabled by "python -O" (tyronecai PR 736)
  • Randomize order of topics/partitions processed by fetcher to improve balance (dpkp PR 732)
  • Allow client.check_version timeout to be set in Producer and Consumer constructors (eastlondoner PR 647)

1.2.2

05 Aug 15:19
Compare
Choose a tag to compare

Bugfixes

  • Clarify timeout unit in KafkaProducer close and flush (ms7s PR 734)
  • Avoid busy poll during metadata refresh failure with retry_backoff_ms (dpkp PR 733)
  • Check_version should scan nodes until version found or timeout (dpkp PR 731)
  • Fix bug which could cause least_loaded_node to always return the same unavailable node (dpkp PR 730)
  • Fix producer garbage collection with weakref in atexit handler (dpkp PR 728)
  • Close client selector to fix fd leak (msmith PR 729)
  • Tweak spelling mistake in error const (steve8918 PR 719)
  • Rearrange connection tests to separate legacy KafkaConnection

1.2.1

05 Aug 15:19
Compare
Choose a tag to compare

Bugfixes

  • Fix regression in MessageSet decoding wrt PartialMessages (#716)
  • Catch response decode errors and log details (#715)
  • Fix Legacy support url (#712 - JonasGroeger)
  • Update sphinx docs re 0.10 broker support

1.2.0

05 Aug 15:21
Compare
Choose a tag to compare

Support for Kafka 0.10

  • Add protocol support for ApiVersionRequest (dpkp PR 678)
  • KAFKA-3025: Message v1 -- add timetamp and relative offsets (dpkp PR 693)
  • Use Fetch/Produce API v2 for brokers >= 0.10 (uses message format v1) (dpkp PR 694)
  • Use standard LZ4 framing for v1 messages / kafka 0.10 (dpkp PR 695)

Consumers

  • Update SimpleConsumer / legacy protocol to handle compressed messages (paulcavallaro PR 684)

Producers

  • KAFKA-3388: Fix expiration of batches sitting in the accumulator (dpkp PR 699)
  • KAFKA-3197: when max.in.flight.request.per.connection = 1, attempt to guarantee ordering (dpkp PR 698)
  • Dont use soon-to-be-reserved keyword await as function name (FutureProduceResult) (dpkp PR 697)

Clients

  • Fix socket leaks in KafkaClient (dpkp PR 696)

Documentation

Internals

  • Support SSL CRL requires python 2.7.9+ / 3.4+
  • Use original hostname for SSL checks (vincentbernat PR 682)
  • Always pass encoded message bytes to MessageSet.encode()
  • Raise ValueError on protocol encode/decode errors
  • Supplement socket.gaierror exception in BrokerConnection.connect() (erikbeebe PR 687)
  • BrokerConnection check_version: expect 0.9 to fail with CorrelationIdError
  • Fix small bug in Sensor (zackdever PR 679)

1.1.1

05 Aug 15:22
Compare
Choose a tag to compare

quick bugfixes

  • fix throttle_time_ms sensor handling (zackdever pr 667)
  • improve handling of disconnected sockets (easypost pr 666 / dpkp)
  • disable standard metadata refresh triggers during bootstrap (dpkp)
  • more predictable future callback/errback exceptions (zackdever pr 670)
  • avoid some exceptions in coordinator.del (dpkp pr 668)

1.1.0

05 Aug 15:23
Compare
Choose a tag to compare

Consumers

  • Avoid resending FetchRequests that are pending on internal queue
  • Log debug messages when skipping fetched messages due to offset checks
  • KAFKA-3013: Include topic-partition in exception for expired batches
  • KAFKA-3318: clean up consumer logging and error messages
  • Improve unknown coordinator error handling
  • Improve auto-commit error handling when group_id is None
  • Add paused() API (zackdever PR 602)
  • Add default_offset_commit_callback to KafkaConsumer DEFAULT_CONFIGS

Producers

Clients

  • Support SSL connections
  • Use selectors module for non-blocking IO
  • Refactor KafkaClient connection management
  • Fix AttributeError in del
  • SimpleClient: catch errors thrown by _get_leader_for_partition (zackdever PR 606)

Documentation

  • Fix serializer/deserializer examples in README
  • Update max.block.ms docstring
  • Remove errant next(consumer) from consumer documentation
  • Add producer.flush() to usage docs

Internals

  • Add initial metrics implementation (zackdever PR 637)
  • KAFKA-2136: support Fetch and Produce v1 (throttle_time_ms)
  • Use version-indexed lists for request/response protocol structs (dpkp PR 630)
  • Split kafka.common into kafka.structs and kafka.errors
  • Handle partial socket send() (dpkp PR 611)
  • Fix windows support (dpkp PR 603)
  • IPv6 support (TimEvens PR 615; Roguelazer PR 642)

1.0.2

09 Apr 00:15
Compare
Choose a tag to compare

This release includes critical bugfixes -- upgrade strongly recommended

Consumers

  • Improve KafkaConsumer Heartbeat handling (dpkp PR 583)
  • Fix KafkaConsumer.position bug (stefanth PR 578)
  • Raise TypeError when partition is not a TopicPartition (dpkp PR 587)
  • KafkaConsumer.poll should sleep to prevent tight-loops (dpkp PR 597)

Producers

  • Fix producer threading bug that can crash sender (dpkp PR 590)
  • Fix bug in producer buffer pool reallocation (dpkp PR 585)
  • Remove spurious warnings when closing sync SimpleProducer (twm PR 567)
  • Fix FutureProduceResult.await() on python2.6 (dpkp)
  • Add optional timeout parameter to KafkaProducer.flush() (dpkp)
  • KafkaProducer Optimizations (zackdever PR 598)

Clients

  • Improve error handling in SimpleClient.load_metadata_for_topics (dpkp)
  • Improve handling of KafkaClient.least_loaded_node failure (dpkp PR 588)

Documentation

  • Fix KafkaError import error in docs (shichao-an PR 564)
  • Fix serializer / deserializer examples (scribu PR 573)

Internals

  • Update to Kafka 0.9.0.1 for integration testing
  • Fix ifr.future.failure in conn.py (mortenlj PR 566)
  • Improve Zookeeper / Kafka Fixture management (dpkp)

1.0.1

09 Apr 00:13
Compare
Choose a tag to compare

Consumers

  • Add RangePartitionAssignor (and use as default); add assignor tests (dpkp PR 550)
  • Make sure all consumers are in same generation before stopping group test
  • Verify node ready before sending offset fetch request from coordinator
  • Improve warning when offset fetch request returns unknown topic / partition

Producers

  • Warn if pending batches failed during flush
  • Fix concurrency bug in RecordAccumulator.ready()
  • Fix bug in SimpleBufferPool memory condition waiting / timeout
  • Support batch_size = 0 in producer buffers (dpkp PR 558)
  • Catch duplicate batch.done() calls [e.g., maybe_expire then a response errback]

Clients

Documentation

  • Improve kafka.cluster docstrings
  • Migrate load_example.py to KafkaProducer / KafkaConsumer

Internals

  • Dont override system rcvbuf or sndbuf unless configured explicitly (dpkp PR 557)
  • Some attributes may not exist in __del__ if we failed assertions
  • Break up some circular references and close client wake pipes on __del__ (aisch PR 554)