akka-persistence-dynamodb
akka-persistence-dynamodb copied to clipboard
DynamoDBRecovery.getReplayBatch should use and honour toSequenceNr
it looks like currently it only/always loads fromSequenceNr to (fromSequenceNr + maxDynamoBatchGet_replayParallelism). also, as it stand today, would it load all events if there are more than (fromSequenceNr + maxDynamoBatchGet_replayParallelism) ?
to conserve consumed read units, it should only load fromSequenceNr to toSequenceNr.
I think the code you are referencing is being called from here, https://github.com/sclasen/akka-persistence-dynamodb/blob/master/src/main/scala/akka/persistence/journal/dynamodb/DynamoDBRecovery.scala#L23 which will be called with increasing fromSequenceNr inside the recursive asyncReplayMessages function. So afaik it will load all requested messages.
+1 to some code that only loads up to toSequenceNr if that is less than maxDynamoBatchGet*replayParallelism
fancy a PR?
Should be fun, unfortunately I'm not going to have time for a few weeks: abandoning akka-persistence and digging deep to build something home grown and make up lost time. Would love to revisit akka-persistence once it's more stable, sounds like that won't be until the end of the year though.