In this section, we will try to understand the HelloWorld API (hello-lagom-api) service code. This is an API microservice for the HelloWorld system.
It has the GreetingMessage data model, as shown here:
case class GreetingMessage(message: String)
object GreetingMessage { implicit val format: Format[GreetingMessage] =
Json.format[GreetingMessage] }
It has a GreetingMessageChanged event, as shown here:
case class GreetingMessageChanged(name: String, message: String)
object GreetingMessageChanged {
implicit val format: Format[GreetingMessageChanged] =
Json.format[GreetingMessageChanged]
}
It has a greetings Topic, as follows:
object HellolagomService {
val TOPIC_NAME = "greetings"
}
This topic is used by embedded Lagom's Kafka or...