Redis Streams · JSON Structure

Redis Stream Entry Structure

JSON structure documentation for a Redis Streams entry, consisting of a millisecond-timestamp ID and field-value pairs.

Type: object Properties: 0
Consumer GroupsEvent-DrivenIn-MemoryMessagingRedisStreaming

Redis Stream Entry Structure is a JSON Structure definition published by Redis Streams.

Meta-schema:

JSON Structure

redis-stream-entry-structure.json Raw ↑
{
  "title": "Redis Stream Entry Structure",
  "description": "JSON structure documentation for a Redis Streams entry, consisting of a millisecond-timestamp ID and field-value pairs.",
  "type": "object",
  "fields": [
    {
      "name": "id",
      "type": "string",
      "required": false,
      "pattern": "^[0-9]+-[0-9]+$",
      "description": "Stream entry ID in format <millisecondsTime>-<sequenceNumber> (e.g., 1526919030474-55). Auto-generated by Redis when * is passed."
    },
    {
      "name": "fields",
      "type": "object",
      "required": true,
      "description": "Key-value pairs forming the stream entry payload. Redis stores all field values as strings.",
      "additionalProperties": {
        "type": "string"
      }
    }
  ],
  "examples": [
    {
      "id": "1526919030474-55",
      "fields": {
        "sensor_id": "sensor-001",
        "temperature": "23.5",
        "humidity": "60",
        "timestamp": "1526919030474"
      }
    }
  ]
}