Skip to content

Consider moving commit method from CommitableOffset (and some others) to KafkaConsumer #462

@LMnet

Description

@LMnet

During the discussion of #409 I suggested that commit method from the CommitableOffset could be moved to the KafkaConsumer.

CommittableOffset feels like pure data, but it contains def commit: F[Unit], which is not data, but a behavior. Maybe it would be better if CommittableOffset will not have the commit method? Maybe it would be more natural to have it on KafkaConsumer (like def commit(committableOffset: CommitableOffset): F[Unit])?

The presence of the commit method in the CommittableOffset adds some difficulties for creating instances like Eq for CommittableOffset.

All Committable... types affected by this problem too.

As a complement to the KafkaConsumer#commit method, we could implement commit on the CommittableOffset as an extension method. It will require KafkaConsumer as an input argument, but overall I think it will help to maintain the current API as much as possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingrequires changes that break binary compatibilityenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions