... where the first three params, and last param are supplied so the projection can both source and save the last offset processed from and to a file.
The above can be simplified by supplying the offset store to just the projection, and also providing a load_event method on the source provider. This will then permit the projection to validate entity seq_nrs in place of the source provider doing it; which would also be consistent with the approach the JVM code takes.
When consuming a projection, we have two offset stores in play.
The first, commit-log-based offset store is provided to the
GrpcSourceProvider
:The source provider will use this offset store to validate each entity's
seq_nr
.The next offset store is further down when running the projection:
... where the first three params, and last param are supplied so the projection can both source and save the last offset processed from and to a file.
The above can be simplified by supplying the offset store to just the projection, and also providing a
load_event
method on the source provider. This will then permit the projection to validate entityseq_nr
s in place of the source provider doing it; which would also be consistent with the approach the JVM code takes.