An event table typically requires the following fields:
EVENT_ID
: A universally unique identifier for each eventMESSAGE_TYPE
: An enum that defines the type of eventSTATUS
: Used to keep track of the status of the event processingCREATED_BY
: Service that created the eventCREATED_DTTM
: Timestamp when event is createdUPDATED_BY
: Service that updated the eventUPDATED_DTTM
: Timestamp when event is updatedExample:
EVENT_ID | SERVICE_MESSAGE_TYPE | STATUS | CREATED_BY | CREATED_DTTM | UPDATED_BY | UPDATED_DTTM |
---|---|---|---|---|---|---|
a4e83689-37ee-40b3-a7db-10552d12a30d | RQ_B_STP | COMPLETED | SERVICE_A | 2019-10-12T07:20:50.52Z | SERVICE_B | 2019-10-12T07:20:50.52Z |
a4e83689-37ee-40b3-a7db-10552d12a30e | DR_C_POST | COMPLETED | SERVICE_B | 2019-10-12T07:20:50.52Z | SERVICE_C | 2019-10-12T07:20:50.52Z |
a4e83689-37ee-40b3-a7db-10552d12a30f | RQ_B_STP | UNPROCESSED | SERVICE_A | 2019-10-12T07:20:50.52Z | SERVICE_A | 2019-10-12T07:20:50.52Z |
Inbound
Used to store event received from an external system.
Request
Used to store event initiated internally by a service to another service within the same application.
Response
Used to store event received from an external system.
Working Data
Used to store event data sent during request or received from response.
Payload
EVENT_ID | TOPIC | SOURCE_SERVICE | TARGET_SERVICE | PAYLOAD | CREATED_BY | CREATED_DTTM |
---|---|---|---|---|---|---|
a3e83689-37ee-40b3-a7db-10552d12a30d | REQUEST_TOPIC_A1 | UPSTREAM_A1 | SERVICE_A | {“event_id”:”a3e83689-37ee-40b3-a7db-10552d12a30d”,”message_type”:”RQ_A_INIT”} | SERVICE_A | 2019-10-12T07:20:50.52Z |
a3e83689-37ee-40b3-a7db-10552d12a30d | RESPONSE_TOPIC_A1 | SERVICE_A | UPSTREAM_A1 | {“event_id”:”a3e83689-37ee-40b3-a7db-10552d12a30d”,”status”:”ACCEPTED”} | SERVICE_A | 2019-10-12T07:20:50.52Z |
a3e83689-37ee-40b3-a7db-10552d12a30d | REQUEST_TOPIC_B | SERVICE_B | DOWNSTREAM_B | {“event_id”:”a3e83689-37ee-40b3-a7db-10552d12a30d”,”message_type”:”RQ_B_STP”} | SERVICE_B | 2019-10-12T07:20:50.52Z |
a4e83689-37ee-40b3-a7db-10552d12a30d | RESPONSE_TOPIC_B | DOWNSTREAM_B | SERVICE_B | {“event_id”:”a4e83689-37ee-40b3-a7db-10552d12a30d”,”status”:”ACCEPTED”} | SERVICE_B | 2019-10-12T07:20:50.52Z |
An event processor processes events based on different message types.
Sample message types:
Statuses are used to keep track of the lifecycle of each event. Common statuses include:
TODO
TODO