Skip to content

Expose Store offset to stream system #408

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

Merged
merged 3 commits into from
Mar 26, 2025

Conversation

Gsantomaggio
Copy link
Member

Expose Store offset to stream system

Falk Jonas - HK added 2 commits March 26, 2025 08:21
@Gsantomaggio Gsantomaggio added this to the 1.8.10 milestone Mar 26, 2025
@Gsantomaggio
Copy link
Member Author

@jonnepmyra can you format the code?

@Gsantomaggio Gsantomaggio marked this pull request as ready for review March 26, 2025 08:23
@jonnepmyra
Copy link
Contributor

Some background to this PR....

In a message handler for a Consumer, you have access to the consumer instance, which allows you to store offsets on the stream—this works well within the context of receiving messages.

However, there are use cases where offset storage is needed outside of the message handling flow. For example when the application is shutting down and we want to explicitly call StoreOffset().

This PR addresses that need

@Gsantomaggio Gsantomaggio merged commit 7d1bb3e into rabbitmq:main Mar 26, 2025
2 checks passed
@bangjiehan
Copy link
Contributor

That's what I need. I try to process messages in batch so I saved and updated a reference to RawConsumer(I'm not sure. It might be disposed later, right?) just for calling StroeOffset. Now I could get rid of it and just call StoreOffset by StreamSystem.

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