Lagom persistence read-side with Cassandra support takes ~20 min to handle an event

  • We are using Lagom persistence with Cassandra support as per the link here.
  • Events are tagged with the count of shards as 4.
  • The very first event after the server starts up is taking way too long (~ 20 min or sometimes longer as well) to show up in the read-side tables.
  • There’s also a Kafka subscriber that has subscribed to the event. That too processes the event at the same time as Cassandra’s event handler.
  • I’ve confirmed in multiple runs that the event appears in the messages table immediately.
  • Another observation is that after a few events are processed, then they start processing immediately.
  • Is it because offsets are not available initially for all the tags (there would be 4 different tag variants created because the count of shards is 4) and once one event of each tag type is processed then there is no lag? This is just a hypothesis.
  • I’ve tried reducing the count of shards to 1, 2, and 3 as well. The first event always takes a lot of time.
2 Likes

Are you per chance omitting setting the first-time-bucket date for Cassandra? It’s a notable mention in the docs that can cause an initial startup delay for reading events.

Thanks for pointing that out @gabizou. I tried adding that setting and ran it again but observed the same behavior.

Hello @SiddharthMiglani did you fix the issue? i am facing almost the same problem.

1 Like