Event Store Subscriptions
Event store subscriptions let one event store consume events produced in another event store. You configure subscriptions on a target event store and point each subscription to a source event store and a set of event types.
Lists all event store subscriptions configured for the target event store.
cratis chronicle subscriptions list --event-store <TARGET_EVENT_STORE>Examples
Section titled “Examples”List subscriptions for the system event store:
cratis chronicle subscriptions list --event-store systemList in plain format:
cratis chronicle subscriptions list --event-store system --output plainAdds an event store subscription to the target event store.
cratis chronicle subscriptions add <SUBSCRIPTION_ID> <SOURCE_EVENT_STORE> <EVENT_TYPES> --event-store <TARGET_EVENT_STORE>Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
SUBSCRIPTION_ID | Unique identifier for the subscription. |
SOURCE_EVENT_STORE | Event store to subscribe from. |
EVENT_TYPES | Comma-separated list of event type IDs to include. |
Examples
Section titled “Examples”Add a subscription from default to system for one event type:
cratis chronicle subscriptions add orders-from-default default MyCompany.Sales.OrderPlaced --event-store systemAdd a subscription with multiple event types:
cratis chronicle subscriptions add sales-feed default MyCompany.Sales.OrderPlaced,MyCompany.Sales.OrderCancelled --event-store systemremove
Section titled “remove”Removes an event store subscription from the target event store.
cratis chronicle subscriptions remove <SUBSCRIPTION_ID> --event-store <TARGET_EVENT_STORE>The command prompts for confirmation before proceeding. Pass --yes to skip the prompt in automated workflows.
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
SUBSCRIPTION_ID | Identifier of the subscription to remove. Use subscriptions list to retrieve IDs. |
Options
Section titled “Options”| Flag | Description |
|---|---|
-y, --yes | Skip confirmation prompt. |
Examples
Section titled “Examples”Remove a subscription interactively:
cratis chronicle subscriptions remove orders-from-default --event-store systemRemove without confirmation:
cratis chronicle subscriptions remove orders-from-default --event-store system --yes