Kafka Events

11 event topics across 3 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. Events are stored in the KafkaOutbox table before publishing (transactional outbox pattern).

Brokers

EnvironmentBroker
Stagingboot-gpm4u49z.c2.kafka-serverless.us-east-1.amazonaws.com:9098
Productionb-1.eventzr-msk-prod.ap-south-1.amazonaws.com:9098

Event Envelope

CloudEvents 1.0 envelopejson
{
  "specversion": "1.0",
  "type": "eventzr.jobs.enqueued.v1",
  "source": "jobs-svc",
  "id": "evt-550e8400-e29b-41d4-a716-446655440000",
  "time": "2026-02-24T12:00:00.000Z",
  "datacontenttype": "application/json",
  "subject": "10000000-0000-4000-8000-000000000004",
  "data": {
    "tenantId": "10000000-0000-4000-8000-000000000004",
    "jobId": "job-uuid",
    "type": "email.send",
    "priority": 5,
    "status": "queued",
    "payload": { "to": "user@example.com", "template": "welcome" }
  }
}

Event Topics (11)

Job Lifecycle6

TopicDescription
eventzr.jobs.enqueued.v1New job enqueued for processing
eventzr.jobs.started.v1Job execution started by a worker
eventzr.jobs.completed.v1Job completed successfully
eventzr.jobs.failed.v1Job execution failed
eventzr.jobs.cancelled.v1Job cancelled by user or system
eventzr.jobs.retried.v1Failed job retried

Dead Letter Queue3

TopicDescription
eventzr.jobs.deadlettered.v1Job moved to dead letter queue after max retries
eventzr.jobs.dlq.replayed.v1DLQ job replayed back to queue
eventzr.jobs.dlq.purged.v1DLQ job permanently purged

Quota2

TopicDescription
eventzr.jobs.quota.exceeded.v1Tenant quota limit exceeded
eventzr.jobs.quota.reset.v1Daily quota counters reset

Consumed Events

The Jobs Service also consumes events from other services for quota management and job lifecycle coordination.

SourceTopic PatternPurpose
auth-svceventzr.auth.tenant.*Auto-initialize tenant quotas on tenant creation
subscriptions-svceventzr.subscriptions.changed.*Update quota limits when subscription tier changes
wallet-svceventzr.wallet.suspended.*Suspend tenant job processing on wallet suspension