Understanding HelloService implementation code
In this section, we will try to understand the Hello Service implementation (hello-lagom-impl) code. This is an implementation microservice for the Hello Reactive System.
It has the HellolagomState state, as shown here:
case class HellolagomState(message: String, timestamp: String)
object HellolagomState {
implicit val format: Format[HellolagomState] =
Json.format[HellolagomState]
}It has the HellolagomEvent event, as show here:
sealed trait HellolagomEvent extends AggregateEvent[HellolagomEvent] {
def aggregateTag = HellolagomEvent.Tag
}
object HellolagomEvent {
val Tag = AggregateEventTag[HellolagomEvent]
} We have defined the following GreetingMessageChanged event to represent the change in the GreetingMessage state:
case class GreetingMessageChanged(message: String) extends HellolagomEvent
object GreetingMessageChanged {
implicit val format: Format[GreetingMessageChanged] =
...