I'm trying to implement some AtLeastOnceDelivery decorator for reliable messaging for different actors. So such decorator attempt to handle pretty intensive messaging and will share the lyfecycle with the application.
According to AtLeastOnceDelivery documentation the deliveryId is a strictly monotonically increasing sequence number without gaps (long).
The question is: what will happen when the value is overflow the max long? Does akka-persistence handle such case correctly?
A quick look at AtLeastOnceDelivery source code tells me that there's nothing in place for handling Long
overflow situations.
I believe the reason why there's no handling in place is because overflow is very unlikely. Scala Long
maximum value is 9223372036854775807. To put this into perspective, even if you processed one billion messages each day, it would take 25269512 years until maximum value is reached.