EventSubscription Configuration
Weik.io 2026.1Configure event subscriptions to receive events from channels.
On this page
Defines a subscription to an event channel, enabling integration flows to receive and process events.
Schema properties#
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
| Source | string |
Yes | - | Name of the event source to subscribe to |
| Channel | string |
Yes | - | Name of the event channel to subscribe to |
YAML examples#
Basic event subscription#
apiVersion: weik.io/v1
kind: EventSubscription
metadata:
name: order-events-subscription
spec:
Source: order-processing
Channel: orders-channelMultiple subscriptions#
apiVersion: weik.io/v1
kind: EventSubscription
metadata:
name: customer-created-subscription
spec:
Source: crm-system
Channel: customer-events
---
apiVersion: weik.io/v1
kind: EventSubscription
metadata:
name: inventory-updated-subscription
spec:
Source: inventory-system
Channel: inventory-events
---
apiVersion: weik.io/v1
kind: EventSubscription
metadata:
name: payment-processed-subscription
spec:
Source: payment-gateway
Channel: payment-eventsDatabase change tracking subscription#
apiVersion: weik.io/v1
kind: EventSubscription
metadata:
name: products-table-subscription
spec:
Source: northwind-database
Channel: product-changesExternal system subscription#
apiVersion: weik.io/v1
kind: EventSubscription
metadata:
name: webhook-events-subscription
spec:
Source: external-webhooks
Channel: webhook-notificationsUsage notes#
EventSubscription configurations connect integration flows to event channels, allowing flows to react to events from various sources.
Event flow#
- An event source generates events
- Events are sent to an event channel
- Subscribers receive events from the channel
- Integration flows process the events
Source and channel references#
The Source and Channel properties must reference existing EventSource and EventChannel configurations. Ensure these resources are created before creating subscriptions.
Example dependency chain:
# 1. Define the event channel
apiVersion: weik.io/v1
kind: EventChannel
metadata:
name: orders-channel
spec:
Type: memory
---
# 2. Define the event source
apiVersion: weik.io/v1
kind: EventSource
metadata:
name: order-processing
spec:
Type: webhook
EventType: com.example.order
EventSource: order-api
---
# 3. Create subscription
apiVersion: weik.io/v1
kind: EventSubscription
metadata:
name: order-subscription
spec:
Source: order-processing
Channel: orders-channelUse cases#
- Process database changes in real-time
- React to external webhook notifications
- Trigger workflows based on system events
- Implement event-driven integration patterns
- Coordinate between microservices
Best practices#
- Use descriptive names that indicate the event type and purpose
- Create separate subscriptions for different event types
- Ensure event sources and channels exist before creating subscriptions
- Monitor subscription health and event processing
- Handle event processing failures gracefully in your integration flows