Skip to content
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

Introduce FanOutOldestId setting for picking last message for fan-out #34

Merged
merged 3 commits into from
Apr 2, 2024

Conversation

sysradium
Copy link
Contributor

@sysradium sysradium commented Mar 31, 2024

Perhaps it makes more sense to allow customisation in fan-out setting?

For example in my case I built a service which has to consume whole stream each time it restarts (it maintains an in-memory read model). I can do that with consumer groups but that does seem to be a good fit for my case

PS. Though it breaks a default behaviour, since by default OldestId is $ :/ I guess the only way out here would a creation of additional configuration parameter ...

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.54%. Comparing base (e1e2380) to head (62ea826).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #34      +/-   ##
==========================================
+ Coverage   78.77%   79.54%   +0.76%     
==========================================
  Files           3        3              
  Lines         523      523              
==========================================
+ Hits          412      416       +4     
+ Misses         82       79       -3     
+ Partials       29       28       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@minghsu0107
Copy link
Collaborator

minghsu0107 commented Mar 31, 2024

I suggest create an additional config field such as FanOutOldestId to avoid breaking change. Remember to also update the test

Others LGTM

@sysradium
Copy link
Contributor Author

sysradium commented Apr 1, 2024

@minghsu0107 thanks. Introduced setting and added a test.

@sysradium sysradium changed the title Use OldestId setting for picking last message for fan-out Introduce FanOutOldestId setting for picking last message for fan-out Apr 1, 2024
@minghsu0107 minghsu0107 merged commit 5cde1a1 into ThreeDotsLabs:main Apr 2, 2024
4 checks passed
@sysradium sysradium deleted the last-id branch April 2, 2024 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants