Skip to content

Lift records with a plain mapK on fs2-kafka 4.1.2 - #299

Merged
alejandrohdezma merged 1 commit into
mainfrom
refactor/plain-mapk-on-fs2-kafka-4.1.2
Sep 30, 2026
Merged

alejandrohdezma merged 1 commit into
mainfrom
refactor/plain-mapk-on-fs2-kafka-4.1.2

Conversation

@alejandrohdezma

Copy link
Copy Markdown
Member

fs2-kafka 4.1.2 ships typelevel/fs2-kafka#1531, which makes a committer produced by KafkaCommitter#mapK equal to the committer it was derived from, so CommittableOffsetBatch merges lifted offsets again. With that, injectK goes back to a plain mapK per record: the per-committer cache from #297 and the fs2.kafka.LiftedCommittableOffset shim are removed.

4.1.2 also fixes a deadlock on KafkaConsumer#unsubscribe once partitions are assigned (typelevel/fs2-kafka#1530), which affected every consumer released through unsubscribe on 4.1.0 and 4.1.1.

The batching test added in #297 is unchanged and keeps passing, now against fs2-kafka's own behaviour.

fs2-kafka 4.1.2 (typelevel/fs2-kafka#1531) makes a committer produced by
`KafkaCommitter#mapK` equal to the committer it was derived from, so
`CommittableOffsetBatch` merges lifted offsets again. `injectK` no longer
needs to cache one lifted committer per consumer, and the
`fs2.kafka.LiftedCommittableOffset` shim that rebuilt offsets around the
cached committer goes with it.

4.1.2 also fixes the deadlock on `KafkaConsumer#unsubscribe` once partitions
are assigned (typelevel/fs2-kafka#1530).
@github-actions github-actions Bot added 📦 refactor Refactor or renaming changes ⚖️ S Size of PR between 50 and 100 lines labels Sep 30, 2026
@alejandrohdezma
alejandrohdezma merged commit a39f5a6 into main Sep 30, 2026
5 checks passed
@alejandrohdezma
alejandrohdezma deleted the refactor/plain-mapk-on-fs2-kafka-4.1.2 branch September 30, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚖️ S Size of PR between 50 and 100 lines 📦 refactor Refactor or renaming changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants