What are messages?
EventCatalog supports different types of messages (commands, events and queries).
- Commands - represent intent, commands can be rejected in distributed systems.
- Events - represents an immutable fact.
- Queries - represent requests for information.
Linking messages to services, domains and channels
- Messages can be sent (producer) or received (consumer) by services, domains or be totally independent.
- You can also route messages through one or more channels (e.g queue, broker, bus).
Resources page
eventcatalog@5.0.0Every event, command and query that is connected to something gets a Resources page. Open it from Quick Reference > Resources in the message's sidebar, or go to /docs/{events|commands|queries}/{message-id}/{version}/resources.
The page lists everything the message connects to, with a Relationship column that shows how each one is connected:
| Resource | Relationship |
|---|---|
| Services, agents and data products that produce or consume the message | Produces, Consumes or Produces & consumes |
| Channels the message travels on | Transports |
| Flows the message appears in | Appears in |
| Messages it triggers or is triggered by | Triggers, Triggered by or Triggers & triggered by |
| Decision records that apply to the message | Governed by |
Use the Inbound filter to see what produces the message (and what triggers it), and Outbound to see what consumes it (and what it triggers). You can also filter by resource type, search, sort and paginate the table. Each row has a ... menu to view the resource's docs, view it in the visualiser, view its schema, or add it to your favorites. See the service Resources page for more on these controls.
Where do messages live?
Messages can live anywhere in your catalog, at the service level or domain level.
Example of a message living at the service level
Here we have the OrderPlaced message living at the service level.
Example of a message living at the domain level
Here we have the OrderPlaced message living at the domain level.
It does not matter where you store your messages, you can reference them from anywhere in your catalog.
Your domains and services will reference them by their id and optionally the version. EventCatalog will resolve the message.