Skip to content

processor/switch: add continue option for conditional case chaining#399

Merged
mmatczuk merged 2 commits intomainfrom
connect-1089
Mar 19, 2026
Merged

processor/switch: add continue option for conditional case chaining#399
mmatczuk merged 2 commits intomainfrom
connect-1089

Conversation

@twmb
Copy link
Copy Markdown
Contributor

@twmb twmb commented Mar 17, 2026

Summary

  • Adds a continue field to switch processor cases
  • Unlike fallthrough (which unconditionally executes the next case), continue passes the message back to be tested against the next case's check condition
  • This mirrors the existing continue option on the switch output
  • Setting both continue and fallthrough on the same case is a validation error

Test plan

  • Test: basic continue behavior (message re-evaluated by next case's check)
  • Test: continue message that doesn't match next case falls through
  • Test: continue + fallthrough mutual exclusion validation
  • All existing switch processor tests pass

Closes redpanda-data/connect#1089

🤖 Generated with Claude Code

Adds a 'continue' field to switch processor cases. Unlike 'fallthrough'
which unconditionally executes the next case, 'continue' passes the
message back to be tested against the next case's check condition.
This mirrors the existing 'continue' option on the switch output.

Setting both 'continue' and 'fallthrough' on the same case is a
validation error.

Closes redpanda-data/connect#1089

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@claude
Copy link
Copy Markdown

claude bot commented Mar 19, 2026

Commits
LGTM

Review
Adds a continue field to switch processor cases that re-evaluates continued messages against subsequent case conditions, complementing the existing fallthrough behavior. Mutual exclusion validation, core logic, and test coverage all look solid.

LGTM

@mmatczuk mmatczuk merged commit 6011633 into main Mar 19, 2026
3 checks passed
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.

Feature request: Add continue option to switch processor

2 participants