@@ -482,6 +482,7 @@ def __init__(self, service_url,
482
482
message_listener_threads = 1 ,
483
483
concurrent_lookup_requests = 50000 ,
484
484
log_conf_file_path = None ,
485
+ stats_interval_in_seconds = 600 ,
485
486
use_tls = False ,
486
487
tls_trust_certs_file_path = None ,
487
488
tls_allow_insecure_connection = False ,
@@ -520,6 +521,9 @@ def __init__(self, service_url,
520
521
log_conf_file_path: str, optional
521
522
This parameter is deprecated and makes no effect. It's retained only for compatibility.
522
523
Use `logger` to customize a logger.
524
+ stats_interval_in_seconds: int, default=600
525
+ Set the interval between each stats information update. Stats are printed and/or
526
+ passed to the statistics listener at this interval. Set to 0 to disable stats collection.
523
527
use_tls: bool, default=False
524
528
Configure whether to use TLS encryption on the connection. This setting is deprecated.
525
529
TLS will be automatically enabled if the ``serviceUrl`` is set to ``pulsar+ssl://`` or ``https://``
@@ -560,6 +564,7 @@ def __init__(self, service_url,
560
564
_check_type (int , message_listener_threads , 'message_listener_threads' )
561
565
_check_type (int , concurrent_lookup_requests , 'concurrent_lookup_requests' )
562
566
_check_type_or_none (str , log_conf_file_path , 'log_conf_file_path' )
567
+ _check_type (int , stats_interval_in_seconds , 'stats_interval_in_seconds' )
563
568
_check_type (bool , use_tls , 'use_tls' )
564
569
_check_type_or_none (str , tls_trust_certs_file_path , 'tls_trust_certs_file_path' )
565
570
_check_type (bool , tls_allow_insecure_connection , 'tls_allow_insecure_connection' )
@@ -574,6 +579,7 @@ def __init__(self, service_url,
574
579
conf .io_threads (io_threads )
575
580
conf .message_listener_threads (message_listener_threads )
576
581
conf .concurrent_lookup_requests (concurrent_lookup_requests )
582
+ conf .stats_interval_in_seconds (stats_interval_in_seconds )
577
583
578
584
if isinstance (logger , logging .Logger ):
579
585
conf .set_logger (self ._prepare_logger (logger ))
0 commit comments