cescoffier / vertx-microservices-workshop

Vert.x Microservices Hand's on lab
http://escoffier.me/vertx-hol/
Apache License 2.0
330 stars 196 forks source link

PortfolioServiceImpl.sendActionOnTheEventBus(): Inconsistent name for the new amount #12

Closed emmanuelrosa closed 7 years ago

emmanuelrosa commented 7 years ago

In section about implementing PortfolioServiceImpl.sendActionOnTheEventBus(), the instructions state that the message being sent must contain a key/value pair named owner, yet the code example uses the name owned:

Write the body of the sendActionOnTheEventBus method in oder to publish a message on the EVENT_ADDRESS address containing a JsonObject as body. This object must contains the following entries: ... owner → the updated (owned) amount

vertx.eventBus().publish(EVENT_ADDRESS, new JsonObject()
    .put("action", action)
    .put("quote", quote)
    .put("date", System.currentTimeMillis())
    .put("amount", amount)
    .put("owned", newAmount));

See https://github.com/cescoffier/vertx-microservices-workshop/blob/master/docs/chapters/portfolio.adoc This is as of commit efc3712bbdb8f5e4474c2222fa98fa966872c25d.