Hello Moiz,
an event detached from it’s lineage does not make much sense for building
up state - which is how persistent actors are designed to be used.
An persistent actor’s state, and your “domain state”, should be built up
from such series of events (and snapshots).

We do support playback “until” a given sequence number, you can achieve
this via:

class Peter extends PersistentActor {
  override def preStart() {
    self ! Recover(toSequenceNr = 20)
  }

  def receiveCommand = { }
  def receiveRecover = {
    case m if lastSequenceNr == 15 => // ...

    case _               => // ...
}

If you only want one of these items, you can just ignore the others like
shown in the example above.
But reading out one specific event is not something we will want to support
(we are actively removing methods that target “one message” in favour of
ranged operations (see deprecated deleteMessage vs.
deleteMessages(toSequenceNr)).


May I ask why you need to read exactly one event?
It would help to understand your use case, and then advice. :-)
​


On Mon, Jul 7, 2014 at 7:00 PM, Moiz Raja <moizr...@gmail.com> wrote:

> I am using akka-persistence and I have a need to read a specific journal
> entry but I do not see a way in akka-persistence to do that.
>
> Is there any reason why an API has not been provided for this? Are there
> any plans to provide this in an upcoming release?
>
> Thanks,
> -Moiz
>
> --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Cheers,
Konrad 'ktoso' Malawski
hAkker @ Typesafe

<http://typesafe.com>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to