Skip to content

feat(gateways): delete expired Kafka group offsets in Iggy - #4790

Open
krishvishal wants to merge 3 commits into
masterfrom
kafka-gateway-safe-defaults
Open

krishvishal wants to merge 3 commits into
masterfrom
kafka-gateway-safe-defaults

Conversation

@krishvishal

@krishvishal krishvishal commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Which issue does this PR address?

Closes #4513.

Rationale

A gateway on its defaults hurt stock Kafka clients. It ran in stub mode, where Produce answers a
retriable error and clients retry without end. With the bridge on, idempotent producers were off.
So a default Java producer wrote a retried batch twice, or after later batches. Topics
never expired. A single gateway never expired committed offsets, so a partition filled its 4,096
group offsets over time.

What changed?

A gateway with only the Iggy address and password ran in stub mode and stored nothing. Now the
bridge, idempotent producers and the coordinator log are on by default, also for a single gateway.
A new topic keeps records for 7 days, as in Kafka:

  • IGGY_KAFKA_BRIDGE_ENABLED is true. Stub mode needs false, and logs a warning.
  • IGGY_KAFKA_IDEMPOTENT_PRODUCERS is true.
  • IGGY_KAFKA_TOPIC_RETENTION_MS is 604800000. -1 keeps records forever.
  • IGGY_KAFKA_COORDINATOR_LOG is true with the bridge, also without IGGY_KAFKA_BROKERS.

Add IGGY_KAFKA_OFFSETS_RETENTION_MINUTES and a read check on new groups.
Iggy creates a consumer group for a user who may read the topic's stream or the topic, not only for a global grant.
A gateway with only the Iggy address and password now keeps a default Java producer in order and expires old data.
@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Nov 8, 2026
@codecov

codecov Bot commented Nov 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.89%. Comparing base (689436f) to head (5b28848).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #4790      +/-   ##
============================================
- Coverage     90.89%   90.89%   -0.01%     
  Complexity     3878     3878              
============================================
  Files          1564     1564              
  Lines        407450   407447       -3     
  Branches     341308   341305       -3     
============================================
- Hits         370368   370342      -26     
- Misses        29706    29728      +22     
- Partials       7376     7377       +1     
Components Coverage Δ
Rust Core 92.35% <ø> (-0.01%) ⬇️
Java SDK 79.38% <ø> (ø)
C# SDK 78.39% <ø> (ø)
Python SDK 86.52% <ø> (ø)
PHP SDK 92.23% <ø> (ø)
Node SDK 96.75% <ø> (ø)
Go SDK 71.81% <ø> (ø)
C++ SDK 86.84% <ø> (ø)
see 22 files with indirect coverage changes
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

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

Labels

S-waiting-on-review PR is waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kafka gateway: deduplicate idempotent producer retries and keep their order

1 participant