Scalable Architecture · JSON Structure

Scalable Architecture Event Structure

Hierarchical structure of a CloudEvents-compliant domain event for event-driven microservice architectures.

Type: Properties: 0
Cloud ArchitectureCloud NativeDistributed SystemsHigh AvailabilityInfrastructureMicroservicesPerformanceResilienceScalabilityService Mesh

Domain Event is a JSON Structure definition published by Scalable Architecture.

Meta-schema:

JSON Structure

Raw ↑
{
  "name": "Domain Event",
  "description": "Hierarchical structure of a CloudEvents-compliant domain event for event-driven microservice architectures.",
  "fields": [
    {
      "name": "specversion",
      "type": "string",
      "description": "CloudEvents specification version (always '1.0').",
      "required": true,
      "default": "1.0"
    },
    {
      "name": "id",
      "type": "string",
      "description": "Unique UUID identifier for this event occurrence.",
      "required": true,
      "format": "uuid"
    },
    {
      "name": "source",
      "type": "string",
      "description": "URI of the originating service context.",
      "required": true,
      "format": "uri"
    },
    {
      "name": "type",
      "type": "string",
      "description": "Event type in reverse-DNS notation (e.g., com.example.orders.created).",
      "required": true
    },
    {
      "name": "subject",
      "type": "string",
      "description": "Entity ID or subject the event is about (e.g., order-12345).",
      "required": false
    },
    {
      "name": "datacontenttype",
      "type": "string",
      "description": "MIME type of the event data payload.",
      "required": false,
      "default": "application/json"
    },
    {
      "name": "dataschema",
      "type": "string",
      "description": "URI of the schema definition for the event data.",
      "required": false,
      "format": "uri"
    },
    {
      "name": "time",
      "type": "string",
      "description": "RFC3339 timestamp of when the event occurred.",
      "required": false,
      "format": "date-time"
    },
    {
      "name": "data",
      "type": "object",
      "description": "Event-type-specific payload carrying the domain data.",
      "required": false
    },
    {
      "name": "partitionkey",
      "type": "string",
      "description": "Kafka partition key for ordered event delivery.",
      "required": false
    },
    {
      "name": "correlationid",
      "type": "string",
      "description": "Cross-service trace correlation identifier.",
      "required": false,
      "format": "uuid"
    },
    {
      "name": "causationid",
      "type": "string",
      "description": "ID of the event or command that caused this event.",
      "required": false,
      "format": "uuid"
    },
    {
      "name": "metadata",
      "type": "object",
      "description": "Operational metadata for routing, retries, and dead letter handling.",
      "required": false,
      "fields": [
        {"name": "retryCount", "type": "integer", "description": "Number of delivery retry attempts.", "default": 0},
        {"name": "deadLetterQueue", "type": "boolean", "description": "Whether the event was moved to DLQ.", "default": false},
        {"name": "version", "type": "integer", "description": "Event schema version for compatibility.", "default": 1}
      ]
    }
  ]
}