This section provides an overview of important Eventuate concepts and how they relate to each other.
A an entity is a business object such as an Order.
An entity is an instance of an EntityType
.
In Domain-Driven Design terms, an entity is an aggregate.
Each entity has an ID, unique among instances of the same entity type, which you can choose or allow Eventuate to assign to you.
An entity has a sequence of one or more events.
You can perform the following operations on an entity
An Entity type
is the type of an entity.
It is a String
and, typically, is a fully qualified class name.
An event is an object representing the occurrence of something important.
Usually an event represents the creation or update of a business object such as an OrderCreated
event or an OrderCancelled
event.
An event can also represent the attempted violation of a business rule such a CreditCheckFailed
event.
The key attributes of an event are:
ID
- A unique indicator assigned by the system to every event.
The string representation of an event ID is “x-y” where x and y are long values.
Event IDs increase monotonically for a given entity.
Type
- An event is an instance of an EventType
.
Sender
- Together, the ID
and type
of the business object that emitted the event.
*Data
** - The serialization of the event’s data.
The data
is currently JSON.
An EventType
is the type of event objects.
It is a String that is typically the fully qualified event class name.
A Subscription
is a named, durable subscription to a set of event types.
The key attributes of a Subscription
include:
EntityType
to a non-empty set of EventTypes
A Subscriber
is the client of the Eventuate Server that consumes events.
The subscriber uses the server’s STOMP API to consume events that match the specified subscription. A subscriber can consume multiple subscriptions simultaneously and multiple subscribers can consume the same subscription simultaneously.
The event delivery semantics are as follows: