@@ -482,6 +482,7 @@ def __init__(self, service_url,
482482 message_listener_threads = 1 ,
483483 concurrent_lookup_requests = 50000 ,
484484 log_conf_file_path = None ,
485+ stats_interval_in_seconds = 600 ,
485486 use_tls = False ,
486487 tls_trust_certs_file_path = None ,
487488 tls_allow_insecure_connection = False ,
@@ -520,6 +521,9 @@ def __init__(self, service_url,
520521 log_conf_file_path: str, optional
521522 This parameter is deprecated and makes no effect. It's retained only for compatibility.
522523 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.
523527 use_tls: bool, default=False
524528 Configure whether to use TLS encryption on the connection. This setting is deprecated.
525529 TLS will be automatically enabled if the ``serviceUrl`` is set to ``pulsar+ssl://`` or ``https://``
@@ -560,6 +564,7 @@ def __init__(self, service_url,
560564 _check_type (int , message_listener_threads , 'message_listener_threads' )
561565 _check_type (int , concurrent_lookup_requests , 'concurrent_lookup_requests' )
562566 _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' )
563568 _check_type (bool , use_tls , 'use_tls' )
564569 _check_type_or_none (str , tls_trust_certs_file_path , 'tls_trust_certs_file_path' )
565570 _check_type (bool , tls_allow_insecure_connection , 'tls_allow_insecure_connection' )
@@ -574,6 +579,7 @@ def __init__(self, service_url,
574579 conf .io_threads (io_threads )
575580 conf .message_listener_threads (message_listener_threads )
576581 conf .concurrent_lookup_requests (concurrent_lookup_requests )
582+ conf .stats_interval_in_seconds (stats_interval_in_seconds )
577583
578584 if isinstance (logger , logging .Logger ):
579585 conf .set_logger (self ._prepare_logger (logger ))
0 commit comments