In this section, we will use the following steps to develop our Reactive System's Producer implementation (wf-producer-impl) microservice:
- Create the Producer command(s), as shown here:
sealed trait WFCommand[R] extends ReplyType[R] case class UseWFMessage(city: String, temperature: String) extends WFCommand[Done] object UseWFMessage { implicit val format: Format[UseWFMessage] = Json.format[UseWFMessage] } case class WF(city: String, temperature: String) extends WFCommand[String] object WF { implicit val format: Format[WF] = Json.format[WF] }
- Define an EventTag for our System Element(s), as follows:
object WFEventTag { val instance: AggregateEventTag[WFEvent] = AggregateEventTag[WFEvent]() ...