-
Notifications
You must be signed in to change notification settings - Fork 106
Description
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.