Package io.nitric.api.event
Provides the Event Service API.
The example below illustrates the Event API.
import io.nitric.api.Event;
import io.nitric.api.Events;
// Create an order completed event
var payload = Map.of("id", id, "status", "completed");
var event = Event.build(payload);
// Publish the event to the orders topic
Events.topic("orders").publish(event);
// Get the list of available topics
List<Topic> topics = Events.topics();
-
Class Summary Class Description Event Provides an Event message class.Event.Builder Provides a Event builder.Events Provides an Event API client.Topic Provides an Topic class.