Rework or remove CommitRecovery
See original GitHub issueRecently 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?
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
On undoing, fixing, or removing commits in git - Seth Robertson
This document is an attempt to be a fairly comprehensive guide to recovering from what you did not mean to do when using...
Read more >How To Recover Reverted Commits In a Git Repository
The fix is to apply that reverting commit, and then revert it back, which will un-revert the changes. This will work even if...
Read more >Learning How to Git: Recover Deleted Commit
Restore The Commit To restore it, we can simply run a hard reset to the commit we want to take. In my case,...
Read more >Git Remove Last Commit – How to Undo a Commit in Git
In this case, you need to use the git restore command. Specifically, the git restore command will look something like this: git restore...
Read more >4. Undoing and Editing Commits - Git Pocket Guide [Book]
The usual thing is to use git commit --amend to replace the commit, then git rebase --continue to let Git continue with the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I agree on removing
CommitRecovery
andJitter
, but would like to keep the default functionality with an option to disable or configure it.Long-term (at least new major release) we should get rid of
CommitRecovery
completely and use a boolean flag (or some basic customization options). But short-term, we’re a bit more limited, hence moving it tocommit
sounds like a reasonable alternative.