December 2019
Intermediate to advanced
314 pages
6h 51m
English
Traditionally, web applications are capable of sending a request to servers to receive a response; that is the standard paradigm. With server-send events, however, it's possible for the server application to send new data to a web page at any time by pushing events (messages) to the web page. These incoming messages are treated as events combined with data inside the web page.
Now, let's demonstrate how to use the Vert.x axle API to stream SSEs in Quarkus. The following class, which has been included in our project, is in charge of sending an SSE to the home page every two seconds:
@Path("/streaming")public class StreamingEndpoint { @Inject io.vertx.axle.core.Vertx vertx; @Inject CustomerRepository customerRepository ...
Read now
Unlock full access