Skip to content

Conversation

@BewareMyPower
Copy link
Contributor

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for exposing encryption context information on Message objects in the Pulsar Python client. This allows applications to access encryption and compression metadata for messages, particularly useful when handling encrypted messages that fail to decrypt.

Key changes:

  • Exposed EncryptionKey and EncryptionContext classes from C++ bindings to Python
  • Added encryption_context() method to the Message class that returns encryption metadata or None for non-encrypted messages
  • Enhanced encryption failure tests to verify encryption context information including keys, compression type, batch size, and decryption status

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
src/message.cc Exports EncryptionKey and EncryptionContext C++ classes to Python bindings and adds encryption_context() method to Message class
pulsar/init.py Adds Python wrapper classes for EncryptionKey and EncryptionContext with comprehensive documentation and properties for accessing encryption metadata
tests/pulsar_test.py Adds test coverage for encryption_context() on both encrypted and non-encrypted messages, including verification of encryption metadata fields

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@BewareMyPower BewareMyPower marked this pull request as draft December 22, 2025 02:25
@BewareMyPower BewareMyPower marked this pull request as ready for review December 23, 2025 07:18
@shibd shibd merged commit 4629281 into apache:main Dec 23, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants