Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@blp
Copy link
Member

@blp blp commented Jan 28, 2026

This is #5525, by @kfollesdal, copied into the feldera upstream repo to enable the CI system to work with it (currently feldera CI isn't able to work with external repos).

Description:

Fixes a bug where pipelines with named NATS consumers would fail with "consumer already exists" errors during rapid restarts or replays, before the previous consumer expires (inactive_threshold).

Changes:

  • Append a unique UUID suffix to named consumers to avoid name collisions
  • If no name is configured, NATS auto-generates a random name (no change needed)
  • Add test verifying named consumers work correctly during restart/replay cycles
  • Improve error context when consumer creation fails

@blp blp self-assigned this Jan 28, 2026
Copilot AI review requested due to automatic review settings January 28, 2026 21:23
@blp blp added bug Something isn't working connectors Issues related to the adapters/connectors crate rust Pull requests that update Rust code user-reported Reported by a user or customer labels Jan 28, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug where NATS pipelines with named consumers would fail with "consumer already exists" errors during rapid restarts or replays before the previous consumer expires.

Changes:

  • Append a unique UUID suffix to explicitly named NATS consumers to prevent name collisions
  • Add error context when consumer creation fails
  • Add test case verifying named consumers work correctly during restart/replay cycles

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
crates/adapters/src/transport/nats/input.rs Implements UUID suffix for named consumers and improves error messages
crates/adapters/src/transport/nats/input/test.rs Adds test infrastructure and test case for named consumer restart scenarios

Add test to check that we do not get error/bug "consumer exist", that we
got when pipeline with a named nats consumer got restarted/replayed.

Signed-off-by: kfollesdal <[email protected]>
This is a fix for the bug "consumer exist" that we get when we had a
named NATS consumer in a pipline that got restarted/replayed.

Signed-off-by: kfollesdal <[email protected]>
@blp blp force-pushed the nats-named-consumer-fix branch from 60db74f to 1b94bba Compare January 28, 2026 21:34
@blp blp enabled auto-merge January 28, 2026 21:34
@blp blp added this pull request to the merge queue Jan 28, 2026
Merged via the queue into main with commit f8ed2ce Jan 29, 2026
1 check passed
@blp blp deleted the nats-named-consumer-fix branch January 29, 2026 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working connectors Issues related to the adapters/connectors crate rust Pull requests that update Rust code user-reported Reported by a user or customer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants