Package io.nitric.api.event
Class Topic
- java.lang.Object
-
- io.nitric.api.event.Topic
-
public class Topic extends Object
Provides an Topic class.
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);
- See Also:
Events
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
Return the topic name.void
publish(Event event)
Publish the given event to this topic.String
toString()
Return the string representation of this object.
-