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

TimstampOffsetBySlice in Projection over gRPC #19

Closed
patriknw opened this issue Jun 5, 2024 · 6 comments
Closed

TimstampOffsetBySlice in Projection over gRPC #19

patriknw opened this issue Jun 5, 2024 · 6 comments

Comments

@patriknw
Copy link
Member

patriknw commented Jun 5, 2024

The TimestampOffsetBySlice should be handled by Projection over gRPC.

Right now it works the first time because NoOffset, after that:

IllegalArgumentException: Expected TimestampOffset or NoOffset, but got [akka.persistence.dynamodb.internal.TimestampOffsetBySlice@2eb21b72]
@pvlugter
Copy link
Contributor

I'll add TimestampOffsetBySlice to akka-persistence-query, and update gRPC projections to support it.

Do we also want to support in r2dbc, so that it could be r2dbc on one side and dynamodb on the other?

@patriknw
Copy link
Member Author

Do we also want to support in r2dbc, so that it could be r2dbc on one side and dynamodb on the other?

I think that can wait until someone is requesting it. Wouldn't that also mean changing the R2dbcOffsetStore to be able to return TimstampOffsetBySlice as first offset?

@pvlugter
Copy link
Contributor

Yes, r2dbc would need to properly support TimestampOffsetBySlice, or we would at least need a translation between them. For TimestampOffsetBySlice to TimestampOffset, just take the earliest. For the other way around, I guess need to assume the TimestampOffset is the earliest for all slices (could fill the map with all possible slices, or have it default in some way).

But requiring projections over gRPC to be the same implementation on both sides for now sounds good.

@pvlugter
Copy link
Contributor

Rather than including TimestampOffsetBySlice in akka-persistence-query, we could possibly make the offset pluggable in gRPC projections? So the implementation takes care of serialization, and can use its own types.

@pvlugter
Copy link
Contributor

Changes are done for this. Just needs an akka-projection release.

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

No branches or pull requests

2 participants