Skip to content

ref(consumer): remove the BLQ (backlog-queue) mechanism#8166

Open
onewland wants to merge 1 commit into
masterfrom
ref/remove-blq
Open

ref(consumer): remove the BLQ (backlog-queue) mechanism#8166
onewland wants to merge 1 commit into
masterfrom
ref/remove-blq

Conversation

@onewland

@onewland onewland commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Removes the backlog-queue (BLQ) mechanism from the Rust consumer. BLQRouter redirected stale messages (by Kafka broker timestamp) to the DLQ topic and panicked the consumer to flush in-memory state on the fresh→stale transition. It was never fully rolled out, the FSM (Idle/RoutingStale/Flushing/Forwarding + panic-to-reset) was hard to reason about, and no storage enabled it in prod.

This is a pure removal (−481 lines, no additions). The DLQ policy/topic are untouched.

Removed

  • rust_snuba/src/strategies/blq_router.rs (the strategy + its unit tests)
  • pub mod blq_router; in strategies/mod.rs
  • BLQ import, the blq_producer_config/blq_topic fields, and the pipeline-wrapping block in factory_v2.rs
  • The blq_producer_config builder + factory args in consumer.rs
  • The two blq_*: None bench fields
  • The 3 consumer.blq_* options from the sentry-options schema

Why

Clears the way for a simpler DLQ-by-age lever (follow-up PR) built on the standard InvalidMessage mechanism, so we can shed a configurable proportion of too-old messages to the DLQ during a backlog and backfill later.

Test plan

  • cargo check --all-targets — clean, no warnings
  • cargo test --lib strategies — 36 pass

🤖 Generated with Claude Code

The backlog-queue router (BLQRouter) redirected stale messages, by Kafka
timestamp, to the DLQ topic and panicked the consumer to flush in-memory
state on the fresh->stale transition. It was never fully rolled out, the
FSM (Idle/RoutingStale/Flushing/Forwarding + panic-to-reset) was hard to
reason about, and no storage enabled it in prod.

Remove the strategy, its wiring in factory_v2/consumer, the bench fields,
and the consumer.blq_* sentry-options. The DLQ policy/topic are untouched.

This clears the way for a simpler DLQ-by-age lever built on the standard
InvalidMessage mechanism.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@onewland onewland marked this pull request as ready for review July 8, 2026 19:43
@onewland onewland requested a review from a team as a code owner July 8, 2026 19:43
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