Fd4s Fs2 Kafka Versions Save

Functional Kafka Streams for Scala

v3.0.0

1 year ago

This is the first stable fs2-kafka release to be based on the 3.x series of the Apache Kafka client library. It is available for Scala 2.12, 2.13, and 3.2; all users are encouraged to upgrade. There are some backwards-incompatible API changes, set out below; for further details, see release notes for 3.0.0-RC1 and previous milestone versions.

Development of the 2.x series will now start to wind down, and the 1.x series will be discontinued. New pull requests that make substantial changes should target the 3.x branch.

Apologies to those whose outstanding pull requests weren't merged in time for this release - it was already very overdue. The intention is to start a 4.x branch in the near future to make further backwards-incompatible improvements.

Backwards-incompatible changes

Serializers and Deserializers

Some changes have been made to how fs2-kafka represents Serializers and Deserializers. The following references Serializers but the same changes have been made to Deserializers.

Typed KeySerializer and ValueSerializer

In some cases, such as when using a schema registry with the fs2-kafka-vulcan module, a given serializer will only be valid either for keys or for values, but not both. This is now represented by the KeySerializer type, representing the ability to serialize a key, and the ValueSerializer type, representing the ability to serialize a value. These are supertypes of the plain Serializer type, which can serialize either a key or a value.

Implementation note: KeySerializer, ValueSerializer and Serializer are aliased subtypes of a new GenericSerializer class, which is contravariantly parameterized with a marker trait KeyOrValue with subtypes Key and Value. User code usually won't need to be concerned with these details.

Replacement of RecordSerializer (and RecordDeserializer) with Resource

RecordSerializer served two purposes: to distinguish between key and value serializers when summoning them implicitly, and to wrap effectful instantiation of serializers. The former purpose is now served by the KeySerializer and ValueSerializer types; the latter, by cats-effect's Resource type. Usages of RecordSerializer[F, A] are thus now replaced by Resource[F, KeySerializer[F, A]] or Resource[F, ValueSerializer[F, A]].

Change to Vulcan module's API

The AvroSerializer class no longer has a using method that returns RecordSerializer; instead it has two methods, forKey and forValue, that respectively return KeySerializer and ValueSerializer inside Resource. (Equivalent changes have been made to AvroDeserializer.)

Simplified representation of producer records (https://github.com/fd4s/fs2-kafka/pull/901)

The ProducerRecords, TransactionalProducerRecords and ProducerResult classes have been replaced with type aliases for different kinds of fs2.Chunk, which they previously wrapped. This was enabled by removal of "passthrough" functionality, which can instead be implemented in user code if needed.

What's Changed since v3.0.0-RC1

Full Changelog since v2.6.0: https://github.com/fd4s/fs2-kafka/compare/v2.6.0...v3.0.0

v2.6.0

1 year ago

This release previously failed to publish but has now been published successfully.

What's Changed

Enhancements

Dependency updates

Misc

New Contributors

Full Changelog: https://github.com/fd4s/fs2-kafka/compare/v2.5.0...v2.6.0

v3.0.0-RC1

1 year ago

This release candidate builds on previous milestone releases of fs2-kafka 3.0. It includes all changes from v2.6.0 and also introduces the breaking change of removing the RecordDeserializer and RecordSerializer types, in favour of simply using Resource for allocating KeySerializer, ValueSerializer etc. It also reintroduces support for Scala 2.12, to encourage all users to migrate quickly to the new version.

What's Changed

Breaking changes

Enhancements

Dependency updates

Misc

New Contributors

Full Changelog: https://github.com/fd4s/fs2-kafka/compare/v3.0.0-M9...v3.0.0-RC1

v3.0.0-M9

1 year ago

This milestone release replaces v3.0.0-M8, which was released from the wrong branch and should not be used.

What's Changed

New Contributors

Full Changelog: https://github.com/fd4s/fs2-kafka/compare/v3.0.0-M7...v3.0.0-M9

v3.0.0-M8

1 year ago

This is a milestone for the forthcoming v3.0.0, based on the v3.x series of the Java kafka-clients library. It contains the same changes as v2.5.0; for differences from the v2.x series, see release notes for previous milestones.

What's Changed

New Contributors

Full Changelog: https://github.com/fd4s/fs2-kafka/compare/v3.0.0-M7...v3.0.0-M8

v2.5.0

1 year ago

This release is identical to v2.5.0-RC1. It is backwards binary compatible with previous stable releases in the 2.x series, but not with milestones for v2.5.0. It includes several enhancements and bug fixes - for full details see notes for v2.5.0-M2, v2.5.0-M3 and v2.5.0-RC1.

What's Changed

New Contributors

Full Changelog: https://github.com/fd4s/fs2-kafka/compare/v2.4.0...v2.5.0

v2.5.0-RC1

1 year ago

This release contains several enhancements and bug fixes. It also reverts two changes from v2.5.0-M2: see below.

What's Changed

Enhancements

Bug fixes

Reverted changes

  • Remove ConsumerSettings.unit and ProducerSettings.nothing by @bplommer in https://github.com/fd4s/fs2-kafka/pull/977
    • These were added in #911 to serve as placeholders to use with the newly added withSerializers/withDeserializers method, but the same purpose can be served by using Array[Byte] for key and value types.
  • Revert #902 by @bplommer in https://github.com/fd4s/fs2-kafka/pull/976
    • Restores previous behaviour whereby deserialization happens inside KafkaConsumerActor - see #962 for rationale.

Updates

CI

New Contributors

Full Changelog: https://github.com/fd4s/fs2-kafka/compare/v2.5.0-M3...v2.5.0-RC1

v3.0.0-M7

2 years ago

This milestone release for fs2-kafka 3.x contains the same improvements as v2.5.0-M3.

v2.5.0-M3

2 years ago

This milestone release exposes some additional consumer functionality and fixes a long-standing bug/shortcoming in the Vulcan integration module, inherited from the Confluent Kafka Avro serializer, whereby auto-registration of Union and some other schemas would not work as expected.

What's Changed

Enhancements

Internals and updates

New Contributors

Full Changelog: https://github.com/fd4s/fs2-kafka/compare/2.5.0-M1...v2.5.0-M3

v2.5.0-M2

2 years ago

This release is identical to v2.5.0-M1, which failed to publish.

This release adds some new features and significantly simplifies the internals of the consumer. Although we don't expect these changes to cause any problems, we're releasing this as a milestone to allow for some extra battle testing before the next stable release.

Note: there is a small change to the behaviour of consumers when using partitionedStream or partitionsMapStream. Previously, failure to deserialize a record would cause the entire consumer to fail; now, it will only cause a single partition stream to fail.

What's Changed

New features

  • Add produce method to KafkaProducerConnection by @bplommer in https://github.com/fd4s/fs2-kafka/pull/900
    • KafkaProducerConnection allocates a producer without being tied to particular serializers, allowing creation of multiple KafkaProducer instances that share a single set of connections to the broker. With this change, it is possible to produce records directly from KafkaProducerConnection by providing serializers when calling produce.
  • Allow creating settings with placeholder serdes, changing serdes in settings by @bplommer in https://github.com/fd4s/fs2-kafka/pull/911
    • This allows creation of ProducerSettings and ConsumerSettings to be decoupled from provision of serializers and deserializers, which is particularly useful when creating multiple producers or consumers with different types.

Docs improvements

Simplification of internals

Dependency updates

New Contributors

Full Changelog: https://github.com/fd4s/fs2-kafka/compare/v2.4.0...2.5.0-M1