Skip to main content

Target

A subscription filter specifying which events a component receives. Combines a domain name with optional event type filters.

Structure

message Target {
string domain = 1; // Domain to subscribe to
repeated string types = 2; // Event types (empty = all)
}

Configuration

Environment variable (distributed mode):

# Format: domain:Type1,Type2;domain2:Type3
ANGZARR_SUBSCRIPTIONS="order:OrderCreated,OrderCompleted;inventory"

Config file (standalone mode):

sagas:
- domain: saga-order-fulfillment
subscriptions: "order:OrderCompleted"

Filter Semantics

ConfigurationEvents Received
orderAll events from order domain
order:OrderCreatedOnly OrderCreated from order
order:OrderCreated,OrderCancelledBoth types

Use by Component Type

ComponentTypical Target
SagaSingle domain, specific events
Process ManagerMultiple domains
ProjectorSingle domain, all or specific events