This is an automated email from the ASF dual-hosted git repository.
xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-python.git
The following commit(s) were added to refs/heads/main by this push:
new 2aaacad Issue #37 : Allow passing pulsar.MessageId instance to
create_reader() (#95)
2aaacad is described below
commit 2aaacad8b13f2498a47d35554a7eec19a7579be2
Author: Eric Hare <[email protected]>
AuthorDate: Thu Feb 16 08:18:33 2023 -0700
Issue #37 : Allow passing pulsar.MessageId instance to create_reader() (#95)
---
pulsar/__init__.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/pulsar/__init__.py b/pulsar/__init__.py
index 0ce2e4b..b1b8a9d 100644
--- a/pulsar/__init__.py
+++ b/pulsar/__init__.py
@@ -882,6 +882,11 @@ class Client:
Symmetric encryption class implementation, configuring public key
encryption messages for the producer
and private key decryption messages for the consumer
"""
+
+ # If a pulsar.MessageId object is passed, access the _pulsar.MessageId
object
+ if isinstance(start_message_id, MessageId):
+ start_message_id = start_message_id._msg_id
+
_check_type(str, topic, 'topic')
_check_type(_pulsar.MessageId, start_message_id, 'start_message_id')
_check_type(_schema.Schema, schema, 'schema')