Skip to content

Commit

Permalink
exercise 14 README - product IDs curl command
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine Bastos committed Oct 11, 2024
1 parent 5589713 commit c0aac24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/exercise_014_Internal_Channels/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class PriceUpdateStreams {
}
```

* Implement the method `public Multi<PriceUpdate> generate()` on the `PriceUpdateStreams` class, and make it return a `Multi` that emits a `PriceUpdate` item *every five seconds*, using a random price between 0 and 100, for each of the products in our database (You can hardcode the product IDs 1 to 7 inclusive) .
* Implement the method `public Multi<PriceUpdate> generate()` on the `PriceUpdateStreams` class, and make it return a `Multi` that emits a `PriceUpdate` item *every five seconds*, using a random price between 0 and 100, for each of the products in our database (You can hardcode the product IDs - use `curl localhost:8080/products` to discover the product IDs saved in the database) .

Tip, look at the `Multi.createFrom().ticks()` method!
Note that the `print` method has an `@Incoming` annotation that matches the `@Outgoing` from the `generate` method. Running the application should print seven lines to the console every five seconds, each line being a price update for a product. Run the app to try this :)
Expand Down

0 comments on commit c0aac24

Please sign in to comment.