6 Beyond the event bus
This chapter covers
- How to expose services on top of the event bus
- Asynchronous testing of both verticles and event-bus services
The event bus is a fundamental tool for articulating event processing in Vert.x, but there is more to it! Event-bus services are useful for exposing typed interfaces rather than plain messaging, especially when multiple message types are expected at an event-bus destination. Testing is also an important concept, and we’ll look at what is different in testing asynchronous Vert.x code compared to traditional testing.
In this chapter we will revisit an earlier example, refactor it into an event-bus service, and test it.
6.1 Revisiting heat sensors with a service API
In chapter 3 we used heat ...
Get Vert.x in Action now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.