Merge pull request #18204 from akka/wip-17918-deleteMessages-replies-patriknw
!per #17918 Make deleteMessages reply msgs public
This commit is contained in:
commit
a473ff23dc
8 changed files with 21 additions and 15 deletions
|
|
@ -335,6 +335,9 @@ Deleting messages in event sourcing based applications is typically either not u
|
|||
up until the sequence number of the data held by that snapshot can be issued, to safely delete the previous events,
|
||||
while still having access to the accumulated state during replays - by loading the snapshot.
|
||||
|
||||
The result of the ``deleteMessages`` request is signaled to the persistent actor with a ``DeleteMessagesSuccess``
|
||||
message if the delete was successful or a ``DeleteMessagesFailure`` message if it failed.
|
||||
|
||||
Persistence status handling
|
||||
---------------------------
|
||||
Persisting, deleting and replaying messages can either succeed or fail.
|
||||
|
|
|
|||
|
|
@ -338,6 +338,9 @@ Deleting messages in event sourcing based applications is typically either not u
|
|||
up until the sequence number of the data held by that snapshot can be issued, to safely delete the previous events,
|
||||
while still having access to the accumulated state during replays - by loading the snapshot.
|
||||
|
||||
The result of the ``deleteMessages`` request is signaled to the persistent actor with a ``DeleteMessagesSuccess``
|
||||
message if the delete was successful or a ``DeleteMessagesFailure`` message if it failed.
|
||||
|
||||
Persistence status handling
|
||||
---------------------------
|
||||
Persisting, deleting and replaying messages can either succeed or fail.
|
||||
|
|
|
|||
|
|
@ -325,6 +325,9 @@ Deleting messages in event sourcing based applications is typically either not u
|
|||
up until the sequence number of the data held by that snapshot can be issued, to safely delete the previous events,
|
||||
while still having access to the accumulated state during replays - by loading the snapshot.
|
||||
|
||||
The result of the ``deleteMessages`` request is signaled to the persistent actor with a ``DeleteMessagesSuccess``
|
||||
message if the delete was successful or a ``DeleteMessagesFailure`` message if it failed.
|
||||
|
||||
Persistence status handling
|
||||
---------------------------
|
||||
Persisting, deleting and replaying messages can either succeed or fail.
|
||||
|
|
|
|||
|
|
@ -390,7 +390,8 @@ private[persistence] trait Eventsourced extends Snapshotter with Stash with Stas
|
|||
/**
|
||||
* Permanently deletes all persistent messages with sequence numbers less than or equal `toSequenceNr`.
|
||||
*
|
||||
* If the delete fails an [[akka.persistence.JournalProtocol.DeleteMessagesFailure]] will be sent to the actor.
|
||||
* If the delete is successful a [[DeleteMessagesSuccess]] will be sent to the actor.
|
||||
* If the delete fails a [[DeleteMessagesFailure]] will be sent to the actor.
|
||||
*
|
||||
* @param toSequenceNr upper sequence number bound of persistent messages to be deleted.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -22,18 +22,6 @@ private[persistence] object JournalProtocol {
|
|||
/** Internal journal acknowledgement. */
|
||||
sealed trait Response extends Message
|
||||
|
||||
/**
|
||||
* Reply message to a successful [[DeleteMessagesTo]] request.
|
||||
*/
|
||||
final case class DeleteMessagesSuccess(toSequenceNr: Long)
|
||||
extends Response
|
||||
|
||||
/**
|
||||
* Reply message to a failed [[DeleteMessagesTo]] request.
|
||||
*/
|
||||
final case class DeleteMessagesFailure(cause: Throwable, toSequenceNr: Long)
|
||||
extends Response
|
||||
|
||||
/**
|
||||
* Request to delete all persistent messages with sequence numbers up to `toSequenceNr`
|
||||
* (inclusive).
|
||||
|
|
|
|||
|
|
@ -21,6 +21,16 @@ case object RecoveryCompleted extends RecoveryCompleted {
|
|||
def getInstance = this
|
||||
}
|
||||
|
||||
/**
|
||||
* Reply message to a successful [[Eventsourced#deleteMessages]] request.
|
||||
*/
|
||||
final case class DeleteMessagesSuccess(toSequenceNr: Long)
|
||||
|
||||
/**
|
||||
* Reply message to a failed [[Eventsourced#deleteMessages]] request.
|
||||
*/
|
||||
final case class DeleteMessagesFailure(cause: Throwable, toSequenceNr: Long)
|
||||
|
||||
/**
|
||||
* Recovery mode configuration object to be returned in [[PersistentActor#recovery]].
|
||||
*
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ package akka.persistence
|
|||
import akka.actor._
|
||||
import akka.event.Logging
|
||||
import akka.event.Logging.Warning
|
||||
import akka.persistence.JournalProtocol.DeleteMessagesFailure
|
||||
import akka.persistence.journal.inmem.InmemJournal
|
||||
import akka.testkit.{ EventFilter, ImplicitSender, TestEvent }
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ package akka.persistence
|
|||
import java.util.concurrent.atomic.AtomicInteger
|
||||
|
||||
import akka.actor._
|
||||
import akka.persistence.JournalProtocol.DeleteMessagesSuccess
|
||||
import akka.testkit.{ ImplicitSender, TestLatch, TestProbe }
|
||||
import com.typesafe.config.Config
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue