In this section, we will use the following steps to develop our Reactive System's Consumer implementation(wf-consumer-impl) microservice:
- Define the WF Consumer's Model, as shown here:
case class WeatherForcasting(city:String, temperature:String) object WeatherForcasting { implicit val format: Format[WeatherForcasting] = Json.format[WeatherForcasting] }
- Define the WF Consumer's command, as follows:
sealed trait WFCommand [T] extends ReplyType[T] case class SaveNewWF(city:String, temperature: String) extends WFCommand[Done] object SaveNewWF { implicit val formatter = Json.format[SaveNewWF] }
- Define the WF Consumer's EventTag, as depicted here:
object WFEventTag { val INSTANCE = AggregateEventTag[WFEvent] ...