Kafka Events
AsyncAPI documentation for search-svc event-driven architecture. 4 produced + 8 consumed topics.
CloudEvents 1.0
All Kafka messages follow the CloudEvents specification v1.0. Partition key is always tenant_id.
Produced Events (4)
Events emitted by search-svc to downstream consumers.
| Topic | Event | Description |
|---|---|---|
eventzr.search.analytics.v1 | SearchExecutedEvent | Search query execution analytics (query, results, timing, AI credits) |
eventzr.search.alert.triggered.v1 | AlertTriggeredEvent | Saved search alert triggered when new matching results found |
eventzr.search.slow-query.v1 | SlowQueryEvent | Slow query warning when execution exceeds threshold |
eventzr.search.autocomplete.v1 | AutocompleteInteractionEvent | User autocomplete suggestion selection tracking |
Consumed Events (8)
Events consumed by search-svc to keep indices in sync.
| Topic | Source | Action |
|---|---|---|
eventzr.event.created.v1 | event-svc | Index new event in OpenSearch |
eventzr.event.updated.v1 | event-svc | Update event document in index |
eventzr.venue.created.v1 | venue-svc | Index new venue in OpenSearch |
eventzr.venue.updated.v1 | venue-svc | Update venue document in index |
eventzr.artist.created.v1 | talent-svc | Index new artist in OpenSearch |
eventzr.brand.created.v1 | brand-svc | Index new brand in OpenSearch |
eventzr.destination.created.v1 | destination-svc | Index new destination in OpenSearch |
eventzr.subscription.changed.v1 | subscriptions-svc | Update rate limits and quotas for tenant |
CloudEvents Envelope
Example produced eventjson
{
"specversion": "1.0",
"type": "eventzr.search.analytics.v1",
"source": "search-svc",
"id": "550e8400-e29b-41d4-a716-446655440000",
"time": "2026-02-24T10:30:00Z",
"datacontenttype": "application/json",
"subject": "tenant/a0000001-0000-0000-0000-000000000001",
"data": {
"query": "music festival",
"entity_type": "event",
"results_count": 42,
"execution_time_ms": 125,
"search_type": "hybrid",
"ai_credits_consumed": 2,
"tenant_id": "a0000001-0000-0000-0000-000000000001",
"user_id": "user-uuid"
}
}