Apache Pulsar · Schema
PulsarMessage
Schema for an Apache Pulsar message including metadata and payload.
Cloud NativeMessagingMulti-TenantPub-SubStreamingApacheOpen Source
Properties
| Name | Type | Description |
|---|---|---|
| messageId | string | Unique message ID in format ledgerId:entryId:partitionIndex |
| payload | object | The message payload, encoded according to the topic schema |
| key | string | Message key used for topic compaction and Key_Shared subscriptions |
| orderingKey | string | Ordering key for Key_Shared subscription ordering |
| properties | object | User-defined key-value properties attached to the message |
| publishTime | string | Timestamp when the message was published |
| eventTime | string | Application-defined event time |
| sequenceId | integer | Sequence ID for deduplication |
| producerName | string | Name of the producer that published the message |
| redeliveryCount | integer | Number of times the message has been redelivered |
| schemaVersion | string | Schema version used to encode the message |
| topic | string | Full topic name (persistent://tenant/namespace/topic) |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/api-evangelist/apache-pulsar/refs/heads/main/json-schema/apache-pulsar-pulsar-message-schema.json",
"title": "PulsarMessage",
"description": "Schema for an Apache Pulsar message including metadata and payload.",
"type": "object",
"properties": {
"messageId": {
"type": "string",
"description": "Unique message ID in format ledgerId:entryId:partitionIndex"
},
"payload": {
"description": "The message payload, encoded according to the topic schema"
},
"key": {
"type": "string",
"description": "Message key used for topic compaction and Key_Shared subscriptions"
},
"orderingKey": {
"type": "string",
"description": "Ordering key for Key_Shared subscription ordering"
},
"properties": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "User-defined key-value properties attached to the message"
},
"publishTime": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the message was published"
},
"eventTime": {
"type": "string",
"format": "date-time",
"description": "Application-defined event time"
},
"sequenceId": {
"type": "integer",
"description": "Sequence ID for deduplication"
},
"producerName": {
"type": "string",
"description": "Name of the producer that published the message"
},
"redeliveryCount": {
"type": "integer",
"description": "Number of times the message has been redelivered"
},
"schemaVersion": {
"type": "string",
"description": "Schema version used to encode the message"
},
"topic": {
"type": "string",
"description": "Full topic name (persistent://tenant/namespace/topic)"
}
}
}