Skip to content

feat(kafka): Use the reloading producer for every topic - #6549

Merged
untitaker merged 3 commits into
masterfrom
hardwire-reloading-producer
Oct 22, 2026
Merged

untitaker merged 3 commits into
masterfrom
hardwire-reloading-producer

Conversation

@untitaker

@untitaker untitaker commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #6529. Every topic now produces through Arroyo's ReloadingKafkaProducer, which swaps its Kafka client when kafka_config or secondary_kafka_configs changes. The static client and the processing.reloading_producer_topics rollout option are removed.

In s4s2 all 12 topics have run on the reloading producer since 2026-10-22 without errors, and a live config reload was tested there without a restart.

  • relay-kafka: removes the Backend enum; add_kafka_topic_config takes a KafkaConfigSource (blob, app, jitter) instead of an optional one. Producers are shared by physical topic only.
  • relay-config: removes reloading_producer_topics and its helpers. A config that still sets it keeps working, since unknown keys are ignored.
  • StoreService always builds the config blob.
  • One Kafka topic name configured on two different Kafka configs is now a startup error. The blob is keyed by topic name, so previously one of them silently went to the other's cluster. No deployment does this; test_outcomes_custom_topic did, and now moves both outcome topics.

This means one Kafka client (and one reload worker thread) per physical topic, instead of one per distinct Kafka config. Regions with sharded topics get one per shard.

ref STREAM-1939

Removes the static Kafka client and the processing.reloading_producer_topics rollout option. Every physical topic now gets its own ReloadingKafkaProducer, which is replaced when the Kafka config changes.

ref STREAM-1939
@untitaker
untitaker requested review from a team as code owners October 22, 2026 14:09
@linear-code

linear-code Bot commented Oct 22, 2026

Copy link
Copy Markdown

STREAM-1939

The config blob is keyed by topic name, so this case silently sent one of the topics to the other's cluster. No deployment uses it; the integration test that did now moves both outcome topics.

ref STREAM-1939
@untitaker
untitaker added this pull request to the merge queue Oct 22, 2026
Merged via the queue into master with commit 2426e71 Oct 22, 2026
34 of 35 checks passed
@untitaker
untitaker deleted the hardwire-reloading-producer branch October 22, 2026 15:50
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