Skip to content

chore(kafka): implement staleness filtering and enforce short topic r…#72

Merged
aniebietafia merged 1 commit into
mainfrom
fix/audio_transcribe_pipeline
May 16, 2026
Merged

chore(kafka): implement staleness filtering and enforce short topic r…#72
aniebietafia merged 1 commit into
mainfrom
fix/audio_transcribe_pipeline

Conversation

@aniebietafia
Copy link
Copy Markdown
Contributor

…etention

  • Add max_message_age_ms staleness guard to BaseConsumer to automatically skip and commit backlogged messages from dead sessions.
  • Configure STT, Translation, and TTS workers to discard any messages older than 2 minutes to prevent processing "ghost" audio on restarts.
  • Enforce a 5-minute retention.ms policy on all real-time pipeline topics (audio.*, text.*) in KafkaManager using alter_configs.
  • Fix alter_configs API usage in KafkaManager by utilizing ConfigResource objects.
  • This ensures the pipeline remains lean and immediately responsive even after backend downtime or restarts.

…etention

- Add `max_message_age_ms` staleness guard to `BaseConsumer` to automatically skip and commit backlogged messages from dead sessions.
- Configure STT, Translation, and TTS workers to discard any messages older than 2 minutes to prevent processing "ghost" audio on restarts.
- Enforce a 5-minute `retention.ms` policy on all real-time pipeline topics (`audio.*`, `text.*`) in `KafkaManager` using `alter_configs`.
- Fix `alter_configs` API usage in `KafkaManager` by utilizing `ConfigResource` objects.
- This ensures the pipeline remains lean and immediately responsive even after backend downtime or restarts.

Signed-off-by: aniebietafia <aniebietafia87@gmail.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 16, 2026

Warning

Rate limit exceeded

@aniebietafia has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 45 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 548d2de6-8a01-49c0-928c-002e40dbe5bb

📥 Commits

Reviewing files that changed from the base of the PR and between 9557c51 and b631982.

📒 Files selected for processing (6)
  • app/kafka/consumer.py
  • app/kafka/manager.py
  • app/modules/meeting/ws_router.py
  • app/services/stt_worker.py
  • app/services/translation_worker.py
  • app/services/tts_worker.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/audio_transcribe_pipeline

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@aniebietafia aniebietafia merged commit d28c0bd into main May 16, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant