PersistentEntity replaying all persistent events

(Guy Youansi) #1

Hi guys,

we are using lagom in production for a small application and we are wondering if there is a way in lagom for replaying all persistent event for a specific PersistentEntity and for all existing PersistentEntities.

I would appreciate any help.


(Alan Klikic) #2

@Gesgui if by “replying events” you refere to readside processor that you can:

  1. create a new readside processor with new offset name
  2. update existing readside processor with update of offset name
  3. delete row in offsetstore table where offset name is like the one in readside processor

This will “reply” events of all entity instances not just specific one.

(Guy Youansi) #3

@aklikic thanks a lot for your answer.
I really don’t understand how to access the offset in the readside processor.
Please could you be more explicit here, because i don’t follow very well? Is there another convenient way for doing that?


(Alan Klikic) #4

@Gesgui from online auction example

ItemRepository.itemEventOffset is a string that represents key in offsetstore table

(Guy Youansi) #5

Hi @aklikic i got it, thanks a lot.