-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework or remove CommitRecovery #623
Comments
Sorry, I only just saw this - had my github notifications set up wrong 🤦♂️ I'll try give this some thought in the next few days. |
I feel like removing commit recovery as a default behaviour would be a regression in terms of robustness and approachability, so I'd like to avoid that if possible. What if we convert
I don't quite understand what you're suggesting. But |
This will definitely not help with the pureconfig, because pureconfig implies that config creation is pure. And it sounds pretty reasonable for me — config is just pure data, why should I need some effects for creating it?
I suggest removing def commit(recovery: CommitRecovery = CommitRecovery.Default): F[Unit] Also, I found a few other options:
case class CommitRecoveryConfig(
enabled: Boolean,
maxAttempts: Int,
maxRetryingTime: FiniteDuration
) And make the The main idea here is to hide the I don't think that we need to evolve |
Ok, your first suggestion sounds reasonable to me. What do you think @vlovgr? |
I agree on removing |
@vlovgr just to clarify — it's option 3, right? |
This was the one I was in favour of - @vlovgr were you thinking this or reducing it to a boolean flag? |
That option sounds good to me. 👍 |
@vlovgr I'm sorry, but I'm still don't understand which is your favorite option. Thinking a bit about this recently and I concluded that the boolean flag is the best option. Moving |
Long-term (at least new major release) we should get rid of |
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.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:
commit
method. As a bonus point here we will be able to remove Jitter from the library, because it uses only inCommitRecovery
logic.CommitRecovery
logic from theKafkaConsumerActor
and offer aCommitRecovery
as an additional option on top of acommit
method?The text was updated successfully, but these errors were encountered: