From e35c8b0d31d9cbbe6ad082d734fd3d1d5fd7f406 Mon Sep 17 00:00:00 2001 From: "Richard S. Imaoka" Date: Tue, 6 Sep 2016 14:20:48 +0900 Subject: [PATCH] Comment on persistenceId uniqueness (#21060) --- akka-docs/rst/java/persistence.rst | 7 +++++++ akka-docs/rst/scala/persistence.rst | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/akka-docs/rst/java/persistence.rst b/akka-docs/rst/java/persistence.rst index 0dc8219df0..29aceb61d8 100644 --- a/akka-docs/rst/java/persistence.rst +++ b/akka-docs/rst/java/persistence.rst @@ -150,6 +150,13 @@ The identifier must be defined with the ``persistenceId`` method. .. _recovery-java: +.. note:: + ``persistenceId`` must be unique to a given entity in the journal (database table/keyspace). + When replaying messages persisted to the journal, you query messages with a ``persistenceId``. + So, if two different entities share the same ``persistenceId``, message-replaying + behavior is corrupted. + + Recovery -------- diff --git a/akka-docs/rst/scala/persistence.rst b/akka-docs/rst/scala/persistence.rst index a8649454ac..4cd8870625 100644 --- a/akka-docs/rst/scala/persistence.rst +++ b/akka-docs/rst/scala/persistence.rst @@ -133,6 +133,13 @@ The identifier must be defined with the ``persistenceId`` method. .. _recovery: +.. note:: + ``persistenceId`` must be unique to a given entity in the journal (database table/keyspace). + When replaying messages persisted to the journal, you query messages with a ``persistenceId``. + So, if two different entities share the same ``persistenceId``, message-replaying + behavior is corrupted. + + Recovery --------