Kafka Events

21 event topics (4 consumed, 17 produced) across 7 categories published to Amazon MSK Serverless.

Event Format: CloudEvents 1.0

All events follow the CloudEvents 1.0 specification. Events are partitioned by tenant_id and published to Amazon MSK Serverless. All produced events use the transactional outbox pattern for reliable delivery. Consumers use Redis-based idempotency (24h TTL) keyed by CloudEvent ID.

Brokers

EnvironmentBrokerAuth
Stagingboot-gpm4u49z.c2.kafka-serverless.us-east-1.amazonaws.com:9098SASL/OAUTHBEARER (IAM)
Productionb-1.eventzr-msk-prod.ap-south-1.amazonaws.com:9098SASL/OAUTHBEARER (IAM)

Event Envelope

CloudEvents 1.0 envelopejson
{
  "specversion": "1.0",
  "type": "com.eventzr.cypher.conversation.created.v1",
  "source": "/cypher-svc/conversations",
  "id": "evt-550e8400-e29b-41d4-a716-446655440000",
  "time": "2026-02-28T12:00:00.000Z",
  "datacontenttype": "application/json",
  "subject": "tenant-uuid",
  "data": {
    "conversationId": "conv-123",
    "tenantId": "tenant-uuid",
    "sessionId": "sess-456",
    "channel": "WHATSAPP",
    "userId": "user-uuid",
    "initialIntent": "CREATE_EVENT",
    "locale": "en-US",
    "startedAt": "2026-02-28T12:00:00.000Z"
  }
}

Consumed Topics (4)

cypher-svc consumes events from these services

Each consumer has its own dedicated consumer group for independent offset tracking. All consumers use Redis-based idempotency with 24h TTL.

TopicConsumer GroupDescription
eventzr.chat.message.created.v1cypher-svc-chat-consumerSyncs chat messages from chat-svc to conversation history
eventzr.mcp.tool.executed.v1cypher-svc-mcp-consumerHandles tool execution results from MCP service, updates task status
eventzr.notify.delivered.v1cypher-svc-notify-consumerHandles notification delivery status updates, updates nudge delivery status
eventzr.wallet.balance.updated.v1cypher-svc-wallet-consumerUpdates local Redis credit cache when tenant wallet balance changes

Produced Topics (17)

Conversation Lifecycle3

TopicDescription
eventzr.cypher.conversation.created.v1New conversation initiated
eventzr.cypher.conversation.updated.v1Conversation state or metrics changed
eventzr.cypher.conversation.completed.v1Conversation reached terminal state

Task Lifecycle3

TopicDescription
eventzr.cypher.task.started.v1Task execution began
eventzr.cypher.task.completed.v1Task completed successfully
eventzr.cypher.task.failed.v1Task execution failed

Voice Call Lifecycle4

TopicDescription
eventzr.cypher.voice-call.started.v1WhatsApp voice call AI session began
eventzr.cypher.voice-call.utterance.v1Voice utterance processed (STT + LLM + TTS)
eventzr.cypher.voice-call.ended.v1Voice call ended (completed/failed/abandoned)
eventzr.cypher.voice-call.analytics.v1Aggregated voice call analytics for dashboards

Session & Credits3

TopicDescription
eventzr.cypher.session.created.v1New user session created
eventzr.cypher.session.expired.v1Session expired or explicitly ended
eventzr.cypher.credits.consumed.v1AI credits consumed for an operation

Nudge & Escalation4

TopicDescription
eventzr.cypher.nudge.sent.v1Proactive nudge sent to user
eventzr.cypher.escalation.created.v1Conversation escalated to human support
eventzr.cypher.escalation.assigned.v1Escalation assigned to a support agent
eventzr.cypher.escalation.resolved.v1Escalation resolved by agent