@@ -697,7 +697,8 @@ def subscribe(self, topic, subscription_name,
697
697
crypto_key_reader = None ,
698
698
replicate_subscription_state_enabled = False ,
699
699
max_pending_chunked_message = 10 ,
700
- auto_ack_oldest_chunked_message_on_queue_full = False
700
+ auto_ack_oldest_chunked_message_on_queue_full = False ,
701
+ start_message_id_inclusive = False
701
702
):
702
703
"""
703
704
Subscribe to the given topic and subscription combination.
@@ -791,6 +792,10 @@ def my_listener(consumer, message):
791
792
can be guarded by providing the maxPendingChunkedMessage threshold. See setMaxPendingChunkedMessage.
792
793
Once, consumer reaches this threshold, it drops the outstanding unchunked-messages by silently acking
793
794
if autoAckOldestChunkedMessageOnQueueFull is true else it marks them for redelivery.
795
+ Default: `False`.
796
+ * start_message_id_inclusive:
797
+ Set the consumer to include the given position of any reset operation like Consumer::seek.
798
+
794
799
Default: `False`.
795
800
"""
796
801
_check_type (str , subscription_name , 'subscription_name' )
@@ -810,6 +815,7 @@ def my_listener(consumer, message):
810
815
_check_type_or_none (CryptoKeyReader , crypto_key_reader , 'crypto_key_reader' )
811
816
_check_type (int , max_pending_chunked_message , 'max_pending_chunked_message' )
812
817
_check_type (bool , auto_ack_oldest_chunked_message_on_queue_full , 'auto_ack_oldest_chunked_message_on_queue_full' )
818
+ _check_type (bool , start_message_id_inclusive , 'start_message_id_inclusive' )
813
819
814
820
conf = _pulsar .ConsumerConfiguration ()
815
821
conf .consumer_type (consumer_type )
@@ -838,6 +844,7 @@ def my_listener(consumer, message):
838
844
conf .replicate_subscription_state_enabled (replicate_subscription_state_enabled )
839
845
conf .max_pending_chunked_message (max_pending_chunked_message )
840
846
conf .auto_ack_oldest_chunked_message_on_queue_full (auto_ack_oldest_chunked_message_on_queue_full )
847
+ conf .start_message_id_inclusive (start_message_id_inclusive )
841
848
842
849
c = Consumer ()
843
850
if isinstance (topic , str ):
0 commit comments