docs(pulsar): add CloudEvents schema wrapping and rawSchema option for Avro and JSON schemas#5084
docs(pulsar): add CloudEvents schema wrapping and rawSchema option for Avro and JSON schemas#5084javier-aliaga wants to merge 3 commits intodapr:v1.17from
Conversation
Document the new behavior where Dapr wraps user-provided Avro schemas inside a CloudEvents envelope before registering with the Pulsar Schema Registry. Add the new `<topic-name>.rawPayload` metadata field for topics that need to skip CE wrapping and register the inner schema directly. Ref: dapr/components-contrib#4302 Signed-off-by: Javier Aliaga <javier@diagrid.io>
b45bc49 to
bf4835e
Compare
There was a problem hiding this comment.
Pull request overview
Updates the Pulsar pub/sub component documentation to explain Avro schema registration behavior when publishing CloudEvents, and introduces a component-level option to register the “inner” Avro schema for raw-payload-only topics.
Changes:
- Document that
<topic-name>.avroschemais wrapped in a CloudEvents Avro envelope schema when CloudEvents wrapping is enabled (default). - Add
<topic-name>.rawSchemametadata to register the inner Avro schema directly (for raw-payload-only topics). - Add a behavior matrix and example configuration for splitting CE-wrapped vs raw-payload topics.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
daprdocs/content/en/reference/components-reference/supported-pubsub/setup-pulsar.md
Outdated
Show resolved
Hide resolved
daprdocs/content/en/reference/components-reference/supported-pubsub/setup-pulsar.md
Outdated
Show resolved
Hide resolved
daprdocs/content/en/reference/components-reference/supported-pubsub/setup-pulsar.md
Outdated
Show resolved
Hide resolved
daprdocs/content/en/reference/components-reference/supported-pubsub/setup-pulsar.md
Show resolved
Hide resolved
32fa66a to
7340081
Compare
Document the new behavior where Dapr wraps user-provided Avro schemas inside a CloudEvents envelope before registering with the Pulsar Schema Registry. Add the new `<topic-name>.rawPayload` metadata field for topics that need to skip CE wrapping and register the inner schema directly. Ref: dapr/components-contrib#4302 Signed-off-by: Javier Aliaga <javier@diagrid.io>
7340081 to
290a970
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
daprdocs/content/en/reference/components-reference/supported-pubsub/setup-pulsar.md
Outdated
Show resolved
Hide resolved
daprdocs/content/en/reference/components-reference/supported-pubsub/setup-pulsar.md
Outdated
Show resolved
Hide resolved
daprdocs/content/en/reference/components-reference/supported-pubsub/setup-pulsar.md
Show resolved
Hide resolved
…hema Update documentation to reflect that the rawschema metadata flag works with both Avro and JSON schema types, not just Avro. Add JSON schema CloudEvents wrapping description and JSON schema example in the YAML config block. Signed-off-by: Javier Aliaga <javier@diagrid.io>
7e3321c to
b06d0ca
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | <topic-name>.jsonschema | N | Enforces JSON schema validation for the configured topic. When CloudEvents wrapping is enabled (the default), the schema registered with the Pulsar Schema Registry is a CloudEvents envelope JSON schema containing the provided schema as the `data` field. | | ||
| | <topic-name>.avroschema | N | Enforces Avro schema validation for the configured topic. When CloudEvents wrapping is enabled (the default), the schema registered with the Pulsar Schema Registry is a CloudEvents envelope Avro schema containing the provided schema as the `data` field. | |
There was a problem hiding this comment.
The spec metadata table has 4 columns (Field/Required/Details/Example), but the new <topic-name>.jsonschema and <topic-name>.avroschema rows only provide 3 cells (missing the Example column). This breaks the Markdown table rendering/alignment; add an Example value (and trailing |) for both rows to match the header.
Summary
<topic-name>.rawschemametadata field, which applies to both schema types, for topics that need to skip CE wrapping and register the inner schema directlyDetails
When CloudEvents wrapping is enabled (the default), Dapr wraps user-provided schemas inside a CloudEvents envelope before registering them with Pulsar. The new
.rawschemametadata flag lets operators opt out ofthis wrapping on a per-topic basis for both
.avroschemaand.jsonschematopics.Ref: dapr/components-contrib#4302
Ref: dapr/components-contrib#4305
Thank you for helping make the Dapr documentation better!
Please follow this checklist before submitting:
In addition, please fill out the following to help reviewers understand this pull request:
Description
Issue reference