eligosource / eventsourced

A library for building reliable, scalable and distributed event-sourced applications in Scala
Apache License 2.0
828 stars 98 forks source link

ReliableChannel should store sender references #50

Closed krasserm closed 11 years ago

krasserm commented 11 years ago

Allows destinations to reply to senders during recovery:

val sender1: ActorRef = ...
val sender2: ActorRef = ...
val channel: ActorRef = ...

channel ! Deliver // recover channel

sender1 and sender2 will receive replies if previous application runs did

channel tell (..., sender1)
channel tell (..., sender2)

without having made a delivery confirmation. If previous application runs where asking channels

channel ? ...

there won't be a future to reply to after recovery and the reply will go to deadLetters. This enhancement will also support storage of sender references before a reliable channel is initialized.