-
Task
-
Resolution: Done
-
Major
-
None
-
None
-
5
-
False
-
-
True
-
subs-swatch
-
-
In order to implement the outbox pattern in swatch-metrics-hbi, we need to add support for persisting the outbox records that will be produced while processing incoming HBI events.
An outbox record should have the following schema:
Column Name | Type | Description |
---|---|---|
id | UUID | A unique ID for the outbox record. |
org_id | varchar | The org_id for the associated event. |
created_on | timestamp with timezone | The timestamp at which this record was created. |
swatch_event_json | JSONB | The JSON string representation of an outgoing SWatch event adhering to our event schema. |
org_id_index | index | An index on org_id to facilitate look ups by org_id via the API |
Event Schema: https://github.com/RedHatInsights/rhsm-subscriptions/blob/main/swatch-model-events/schemas/event.yaml
Required Testing
- Only unit tests covering repository CRUD operations are required at this point.
Acceptance Criteria
- Liquibase change set is created that creates the new outbox table.
- An outbox entity object is created.
- A repository is created that supports CRUD persistence operations that will be used by the internal REST API.
- blocks
-
SWATCH-3785 Store outbox records for all SWatch events instead of sending messages.
-
- Release Pending
-