com.lightbend.lagom.scaladsl.persistence.ReadSideProcessor
Flow to handle the events.
Flow to handle the events.
If the handler does any blocking, this flow should be configured to use a dispatcher that is configured to allow for that blocking.
Prepare the database for all processors.
Prepare the database for all processors.
This will be invoked at system startup. It is guaranteed to only be invoked once at a time across the entire cluster, and so is safe to be used to perform actions like creating tables, that could cause problems if done from multiple nodes.
It will be invoked again if it fails, and it may be invoked multiple times as nodes of the cluster go up or down. Unless the entire system is restarted, there is no way to guarantee that it will be invoked at a particular time - in particular, it should not be used for doing upgrades unless the entire system is restarted and a new cluster built from scratch.
A Future
that is redeemed when preparation is finished.
Prepare this processor.
Prepare this processor.
The primary purpose of this method is to load the last offset that was processed, so that read side processing can continue from that offset.
This also provides an opportunity for processors to do any initialisation activities, such as creating or updating database tables, or migrating data.
This will be invoked at least once for each tag, and may be invoked multiple times, such as in the event of failure.
The tag to get the offset for.
A Future
that is redeemed when preparation is finished.
An read side offset processor.
This is responsible for the actual read side handling, including handling offsets and the events themselves.