mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-05-20 04:45:12 +02:00
fix: suppress Pulsar C++ client log noise (#936)
Revert consumer receive timeout from 100ms back to the original 2000ms. The 100ms change was based on a misunderstanding — receive() is a blocking call that returns immediately when a message arrives, so the timeout only affects how quickly a consumer checks the shutdown flag during idle periods. 100ms generated ~200 WARN lines/sec from the C++ client with no latency benefit. Also set the Pulsar C++ client logger to Error level so residual timeout warnings from the subscriber (250ms) don't produce noise. Update poll timeout test to match reverted 2000ms value
This commit is contained in:
parent
29d3100c46
commit
47dfc30c1c
3 changed files with 13 additions and 10 deletions
|
|
@ -188,7 +188,7 @@ class Consumer:
|
|||
try:
|
||||
msg = await loop.run_in_executor(
|
||||
executor,
|
||||
lambda: consumer.receive(timeout_millis=100),
|
||||
lambda: consumer.receive(timeout_millis=2000),
|
||||
)
|
||||
except Exception as e:
|
||||
# Handle timeout from any backend
|
||||
|
|
|
|||
|
|
@ -139,6 +139,10 @@ class PulsarBackend:
|
|||
if api_key:
|
||||
client_args['authentication'] = pulsar.AuthenticationToken(api_key)
|
||||
|
||||
client_args['logger'] = pulsar.ConsoleLogger(
|
||||
_pulsar.LoggerLevel.Error
|
||||
)
|
||||
|
||||
self.client = pulsar.Client(**client_args)
|
||||
logger.info(f"Pulsar client connected to {host}")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue