# Missing entries (events) in cassandra messages table

**URL:** <https://discuss.akka.io/t/missing-entries-events-in-cassandra-messages-table/7840>\
**Category:** Persistence / Event Sourcing\
**Created:** [February 9, 2021, 12:19pm UTC](https://discuss.akka.io/t/missing-entries-events-in-cassandra-messages-table/7840 "2021-02-09T12:19:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![slasch](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/slasch/32/2132_2.png) [@slasch](https://discuss.akka.io/u/slasch)\
**Post date:** [February 9, 2021, 12:19pm UTC](https://discuss.akka.io/t/missing-entries-events-in-cassandra-messages-table/7840/1 "2021-02-09T12:19:09Z")

</div>

Hi, I have a strange issue with my persistence/eventsourcing/cluster/sharding system.

I have millions of persistent actors that are short-living (2 to 7 days, mostly only 2) that model state. The idea is to have them passivated after some time and thus have only active in memory. There are no snapshots involved.

I noticed that after some time restarting k8s pods lead to errors like the following in logs:

```auto
java.lang.IllegalStateException: Sequence number [1] still missing after [10.00 s], saw unexpected seqNr [3] for persistenceId [Entity|02040044000060].

```

Checking the journal (the cassantra `messages` table) shows that there are indeed only events with sequenceNr 3, 4 and 5 for given peristence Id.

The sharding is configured as following:

```auto
    sharding {
      role = "state"
      state-store-mode = ddata
      passivate-idle-entity-after = 48 h
    }

```

and the actor is implemented very close to the example given in the documentation:

```auto
Behaviors.setup { context =>
  EventSourcedBehavior.withEnforcedReplies[EntityCommand, EntityEvent, EntityState](
    persistenceId = PersistenceId(EntityKey.name, EntityId),
    emptyState = EntityState.empty,
    commandHandler = commandHandler(context),
    eventHandler = eventHandler(context)
  )
  .onPersistFailure(SupervisorStrategy.restartWithBackoff(minBackoff = 5.seconds, maxBackoff = 30.seconds, randomFactor = 0.1))
  .withTagger(tagger)
  .withRecovery(Recovery.withSnapshotSelectionCriteria(SnapshotSelectionCriteria.none))
}

```

I’d be very grateful for any suggestions or ideas about fixing this issue.

---

<div class="post-metadata">

**Author:** ![rinmalavi](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/rinmalavi/32/2910_2.png) [@rinmalavi](https://discuss.akka.io/u/rinmalavi)\
**Post date:** [August 30, 2022, 8:03am UTC](https://discuss.akka.io/t/missing-entries-events-in-cassandra-messages-table/7840/2 "2022-08-30T08:03:21Z")

</div>

Hi, have you found how to resolve this issue, I am having something the same issue.

---

<div class="post-metadata">

**Author:** ![slasch](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/slasch/32/2132_2.png) [@slasch](https://discuss.akka.io/u/slasch)\
**Post date:** [August 30, 2022, 9:16am UTC](https://discuss.akka.io/t/missing-entries-events-in-cassandra-messages-table/7840/3 "2022-08-30T09:16:52Z")

</div>

Hi, unfortunately we could not solve this. Switched from akka-persistence to kafka-streams at the end.
