Skip to content

Move consumer lag monitoring to separate thread with per-partition#707

Open
MridulS wants to merge 2 commits intomainfrom
consumer_lag
Open

Move consumer lag monitoring to separate thread with per-partition#707
MridulS wants to merge 2 commits intomainfrom
consumer_lag

Conversation

@MridulS
Copy link
Member

@MridulS MridulS commented Feb 12, 2026

No description provided.

MridulS and others added 2 commits February 12, 2026 12:23
…eakdown

The lag computation (get_watermark_offsets + position for each partition)
was running inside the consume loop, blocking message consumption for up
to N_partitions * 1.0s every 30 seconds. This caused lag to accumulate
during metrics logging.

- Move lag computation to a dedicated daemon thread that runs independently
- Reduce watermark query timeout from 1.0s to 0.1s per partition
- Log per-partition lag breakdown (partition_lags) to identify which
  topics contribute most to the total lag

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Logs total events, total messages, and per-source event counts every
30 seconds from KafkaToEv44Adapter. This helps correlate event rates
with consumer lag to identify which detectors contribute most data.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@SimonHeybrock
Copy link
Member

Could you remove the ev44 from this branch? We wouldn't want to do both here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants