From 55729bdbbfa3a8ac460a0f525cc6f4bac8a5d728 Mon Sep 17 00:00:00 2001 From: Richard Imaoka Date: Sun, 9 Oct 2016 06:07:06 +0900 Subject: [PATCH] Doc - Add warning note about persistence message deletion (#21486) --- akka-docs/rst/java/persistence.rst | 6 ++++++ akka-docs/rst/scala/persistence.rst | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/akka-docs/rst/java/persistence.rst b/akka-docs/rst/java/persistence.rst index 9c57f2c2c8..7e2da4e589 100644 --- a/akka-docs/rst/java/persistence.rst +++ b/akka-docs/rst/java/persistence.rst @@ -384,6 +384,12 @@ 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. +.. warning:: + If you are using :ref:`persistence-query-java`, query results may be missing deleted messages in a journal, + depending on how deletions are implemented in the journal plugin. + Unless you use a plugin which still shows deleted messages in persistence query results, + you have to design your application so that it is not affected by missing messages. + 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. diff --git a/akka-docs/rst/scala/persistence.rst b/akka-docs/rst/scala/persistence.rst index 74a7050a8f..c724162707 100644 --- a/akka-docs/rst/scala/persistence.rst +++ b/akka-docs/rst/scala/persistence.rst @@ -372,6 +372,12 @@ 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. +.. warning:: + If you are using :ref:`persistence-query-scala`, query results may be missing deleted messages in a journal, + depending on how deletions are implemented in the journal plugin. + Unless you use a plugin which still shows deleted messages in persistence query results, + you have to design your application so that it is not affected by missing messages. + 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.