feat: implement ProtobufNative schema#299
Merged
BewareMyPower merged 4 commits intoMay 12, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Implements support for Pulsar’s PROTOBUF_NATIVE schema type in the Python client, enabling producers/consumers to use native Protobuf binary encoding with a schema definition compatible with the Java client’s ProtobufNativeSchema.
Changes:
- Add
ProtobufNativeSchemaimplementation that builds afileDescriptorSet-based schema definition and encodes/decodes using Protobuf binary. - Export
SchemaType.PROTOBUF_NATIVEfrom the_pulsarextension and expose the new schema frompulsar.schema. - Add unit tests and CI install updates for protobuf-backed schema tests.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
pulsar/schema/schema_protobuf.py |
Adds ProtobufNativeSchema implementation and schema definition construction from Protobuf descriptors. |
pulsar/schema/__init__.py |
Exposes ProtobufNativeSchema from the schema package. |
src/enums.cc |
Exports SchemaType.PROTOBUF_NATIVE into the Python bindings. |
setup.py |
Adds a protobuf extra and reuses it from the functions extra. |
tests/schema_test.py |
Adds brokerless unit tests for ProtobufNativeSchema and imports generated test messages. |
tests/test_schema.proto |
Defines test Protobuf messages used by the new unit tests. |
tests/test_schema_pb2.py |
Adds checked-in generated Protobuf Python code for the test messages. |
.github/workflows/ci-pr-validation.yaml |
Installs wheel with [avro,protobuf] extras for CI unit tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
RobertIndie
approved these changes
May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #294