-
Notifications
You must be signed in to change notification settings - Fork 106
Open
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Recently I have worked with the CommitRecovery
functionality. And I found that this part of the library is not pleasant to work with.
In particular, I faced the next issues:
recoverCommitWith
signature has specific bounds onF
. And there is no way to add some extra bounds if I want. For example, I wanted to use log4cats and add some details about retrying insiderecoverCommitWith
. And at the current moment, I can't that becauserecoverCommitWith
doesn't have aSync
bound. OverallrecoverCommitWith
's signature feels weird and limiting.CommitRecovery.Default
is pretty nice, but not configurable.- I'm using pureconfig for my configuration and I had to create a custom wrapper around
CommitRecovery
to make it works nicely with the pureconfig.
Also, It's debatable that this functionality should be built-in inside fs2-kafka. For me, it looks like all this retries stuff could be delegated to a specialized solution like cats-retry. And it may look more natural and composable. ATM this part is not composable: I had to overcome some difficulties to use CommitRecovery
with the pureconfig, log4cats, and cats-retry.
I can suggest 2 ways of solving this:
- Completely remove this functionality. If the user will want to retry commit failures he can use any library and add retries on top of the
commit
method. As a bonus point here we will be able to remove Jitter from the library, because it uses only inCommitRecovery
logic. - Somehow rework this functionality. Maybe remove
CommitRecovery
logic from theKafkaConsumerActor
and offer aCommitRecovery
as an additional option on top of acommit
method?
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request