Visitar URL original
[fix][broker] Support schema-less auto-produce registration by poorbarcode · Pull Request #27111 · apache/pulsar · GitHub
Skip to content

[fix][broker] Support schema-less auto-produce registration - #27111

Merged
poorbarcode merged 4 commits into
apache:masterfrom
poorbarcode:auto_producer_improve
Oct 30, 2026
Merged

poorbarcode merged 4 commits into
apache:masterfrom
poorbarcode:auto_producer_improve

Conversation

@poorbarcode

@poorbarcode poorbarcode commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Fixes #27048

Modifications

The protocol now identifies AUTO_PRODUCE_BYTES producers and advertises whether a broker accepts their schema-less registration. A supporting broker accepts that registration and enforces that each produced message carries a non-empty schema version when schema validation is enabled. This avoids unintended topic-schema registration while preserving schema-validation guarantees.

  • Add the producer marker and the broker feature flag to the wire protocol.
  • Omit the producer schema only when the connected broker advertises support; retain the existing registration behavior with older brokers.
  • Register message schemas on demand for producers registered without a schema, and cover global/topic validation, batching, deletion, protocol, and legacy-broker behavior with tests.
  • Propagate the capability through direct Proxy connections and conservatively disable it for lookup Proxy connections without a known backend.

Does this pull request potentially affect one of the following parts

No.

Compatibility: new clients retain the existing schema-carrying registration when connected to older brokers, while older clients ignore the new optional protocol fields when connected to newer brokers. A new Proxy forwards the capability only when its directly connected backend broker advertises it; lookup Proxy connections conservatively use the legacy behavior.

@poorbarcode poorbarcode self-assigned this Oct 25, 2026
@poorbarcode poorbarcode added this to the 5.1.0 milestone Oct 25, 2026
@poorbarcode poorbarcode added the type/bug The PR fixed a bug or issue reported a bug label Oct 25, 2026

@Denovo1998 Denovo1998 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@poorbarcode

Copy link
Copy Markdown
Contributor Author

After #27033 is finished, we will cherry-pick the current PR into branch-4.0 and branch-4.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][broker] Replication recovery can restore a deleted remote schema

3 participants