Release Notes (2.0.x)
Warning
Pekko Connectors Kafka 2.x and Pekko 2.x are not binary compatible with their 1.x releases. Libraries built against Pekko 1.x or Pekko Connectors Kafka 1.x cannot be trusted to work with Pekko Connectors Kafka 2.x, and need to be rebuilt and released for Pekko 2.x. See the Pekko 2.0 release notes for the binary compatibility changes in the core Pekko modules.
Read the migration guide before upgrading from Pekko Connectors Kafka 1.x.
2.0.0
Release notes for Apache Pekko Connectors Kafka 2.0.0. This is the first release of a new major version and includes the changes from the 2.0.0-M1 milestone release. See the GitHub milestones for 2.0.0-M1 and 2.0.0-M2 for a fuller list of changes.
Main changes
- Pekko 2.0.0 is the new minimum Pekko version
- Java 17 is the new minimum Java version
- Scala 2.12 support has been dropped
- The Kafka client has been upgraded to 4.x (PR358)
- Deprecated code has been removed (PR369)
- The Java DSL uses
java.lang.Longfor offsets, acceptsjava.time.Durationand has wider generic parameter types (PR691) ConsumerSettings,ProducerSettingsandCommitterSettingsreject durations and counts that are not positive (PR627)
Additions
ConsumerSettings.withPartitionAssignmentStrategiesandwithPartitionAssignmentStrategyCooperativeStickyAssignorto select the partition assignment strategies (PR506)- The testkit can start Confluent Platform 8.x (Kafka 4) containers in KRaft mode (PR646)
Bug Fixes
- Retry offset commits that fail with a transient
TimeoutExceptionorCoordinatorLoadInProgressException(PR505) - Clear lastRevoked after use to avoid wiping buffers under cooperative rebalancing (PR617)
- Transactional producer: abort the transaction when the final commit fails as the stage completes, and do not let a failing abort hide the original stage failure (PR623)
- Transactional sources wait in the partition revoke callback until the in-flight records of the revoked partitions are drained, so records are not duplicated across a rebalance. The wait is marked as blocking and the dispatcher sizing it needs is described in the transactions documentation (PR695)
- Implement
hashCodeon the committer used by committable offsets, consistent with itsequals(PR625) - Propagate
KafkaConnectionFailedto the owner actor of the consumer actor (PR626) - Close Kafka producers that are created after their stage has completed, and close the Kafka consumer when a partition assignment handler fails in
onStop(PR650) - Release all testkit resources when cleanup or cluster startup fails (PR651)
DrainingControl.isShutdownattaches its callbacks only once, and the Java DSL version waits for the stream to complete (PR683)- Let a transactional consumer leave its group promptly when the source stage stops before the consumer actor (PR697)
ConsumerSettings.toStringandProducerSettings.toStringhide the values of properties that are not part of Kafka’s own consumer or producer configuration, and no longer validate the properties (PR714)
Dependency Changes
- kafka-clients 4.4.0
2.0.0