Hi guys,
I am having some issue with the Coordinators in one of my Lagom services. Believe or not, I have lost some of the messages that belong to the certain Coordinator (/sharding/kafkaProducer-someService-xyzEventCoordinator). Not only that, the incorrect messages have been written to the messages table for this same persistence_id with the duplicated sequence number, which gave us the error messages like the following:
Invalid replayed event [sequenceNr=9, writerUUID=b363c43e-8988-4b11-a141-9b2e219a7956]. There was already a newer writer whose last replayed event was [sequenceNr=8, writerUUID=xxxxxx5472-fe40-4c14-9f62-ee6796c45a20] for the same persistenceId [/sharding/xyzProcessorCoordinator].Perhaps, the old writer kept journaling messages after the new writer created, or duplicate persistentId for different entities?
My understanding of Coordinator is that it is responsible for processing event streams of the certain type for some kind of writer / producer.
I have three questions:
1. What is really xyzCoordinators doing in Lagom?
2. Are they important enough to be using PersistentEntity? Why Lagom persist their events in the journal for?
(Most Important) 3. What would be implications / side effects if we just delete all the messages that belong to this particular coordinator that we are having this problem with from the messages table and restart the service?
I am using Cassandra for the persistence.
Many Thanks,
oo