You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Enhancement/Feature Issue #47] Added support for KeySharedPolicy for the consumer when in KeyShared mode. (#109)
### Motivation
The pulsar python client lacks support for defining KeyShared behaviour like out of order message delivery and sticky-hash, auto-hash for consumers in KeyShared mode. This PR adds full support. The user can now provide a KeySharedPolicy when starting a consumer with client.subscribe() #47
The ConsumerConfiguration::KeySharedPolicy and related setter/getter are now exposed to the Python client in this PR.
### Modifications
- Added pybind11 enum for KeySharedMode in src/enums.cc.
- Added pybind11 class for KeySharedPolicy in src/config.cc.
- Modified pybind11 class for ConsumerConfiguration and added function to set KeySharedPolicy and function to read KeySharedPolicy.
- Added KeySharedPolicy wrapper to pulsar/__init__.py. This wrapper handles KeySharedPolicy initialization and does some value validation.
- Added the key_shared_policy parameter to client.subscribe(), some validation, and adding to the config in pulsar/__init__.py.
- Added 4 new tests to test the new KeySharedPolicy functionality to tests/pulsar_test.py
0 commit comments