Kafka Events

4 published and 2 consumed event topics via 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. chat-svc publishes 4 event types and consumes 2 from user-svc.

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": "eventzr.chat.message.sent.v1",
  "source": "chat-svc",
  "id": "evt-550e8400-e29b-41d4-a716-446655440000",
  "time": "2026-02-28T12:00:00.000Z",
  "datacontenttype": "application/json",
  "subject": "tenant-uuid",
  "data": {
    "messageId": "msg-uuid",
    "threadId": "thread-uuid",
    "tenantId": "tenant-uuid",
    "senderId": "user-uuid",
    "content": "Hello world!",
    "attachments": [],
    "mentions": [],
    "parentMessageId": null,
    "sentAt": "2026-02-28T12:00:00.000Z"
  }
}

Event Topics (6)

Messages1

TopicDescription
eventzr.chat.message.sent.v1Published when a new message is sent in a thread

Thread Lifecycle3

TopicDescription
eventzr.chat.thread.created.v1Published when a new thread (direct, group, or channel) is created
eventzr.chat.thread.updated.v1Published when thread metadata is modified (name, settings, participants)
eventzr.chat.thread.archived.v1Published when a thread is archived

Consumed Events (Inbound)2

TopicDescription
eventzr.users.profile.updated.v1Consumed from user-svc to update cached user display names and avatars
eventzr.users.deleted.v1Consumed from user-svc for GDPR compliance (anonymize chat data)