Merge pull request #29539 from akka/wip-27786-setDeliverySnapshot-patriknw
Fix time in AtLeastOnce.setDeliverySnapshot, #27786
This commit is contained in:
commit
6becd8e0ee
1 changed files with 2 additions and 1 deletions
|
|
@ -361,7 +361,8 @@ trait AtLeastOnceDeliveryLike extends Eventsourced {
|
||||||
*/
|
*/
|
||||||
def setDeliverySnapshot(snapshot: AtLeastOnceDeliverySnapshot): Unit = {
|
def setDeliverySnapshot(snapshot: AtLeastOnceDeliverySnapshot): Unit = {
|
||||||
deliverySequenceNr = snapshot.currentDeliveryId
|
deliverySequenceNr = snapshot.currentDeliveryId
|
||||||
val now = System.nanoTime()
|
// deliver on next tick
|
||||||
|
val now = System.nanoTime() - redeliverInterval.toNanos
|
||||||
unconfirmed = scala.collection.immutable.SortedMap.from(snapshot.unconfirmedDeliveries.iterator.map(d =>
|
unconfirmed = scala.collection.immutable.SortedMap.from(snapshot.unconfirmedDeliveries.iterator.map(d =>
|
||||||
d.deliveryId -> Delivery(d.destination, d.message, now, 0)))
|
d.deliveryId -> Delivery(d.destination, d.message, now, 0)))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue