Merged
Size
M
Change Breakdown
Bug Fix75%
Refactor25%
#27877fix(core): Debounce per event type in pubsub

Pubsub debounce now scoped per event type

Shared debounce logic in the pubsub subscriber was silently dropping commands of different types that arrived within 300ms of each other. Now each event type gets its own debounced handler, so no messages are lost.

The pubsub subscriber was using a single debounced handler for all message types. When a debounced command was pending, a different command type arriving within 300ms would be silently dropped — the handler was already scheduled and would only fire once.

The fix creates a separate debounced handler per event type. Each unique command or response type now has its own 300ms debounce window, so overlapping messages of different types are processed independently.

In the CLI's scaling pubsub layer, this means inter-process commands and worker responses won't accidentally block each other.

View Original GitHub Description

Summary

Fix shared debounce in pubsub subscriber that could cause one debounced command to silently drop another of a different type arriving within 300ms

Related Linear tickets, Github issues, and Community forum posts

n/a

<!-- Include links to **Linear ticket** or Github issue or Community forum post. Important in order to close *automatically* and provide context to reviewers. https://linear.app/n8n/issue/ --> <!-- Use "closes #<issue-number>", "fixes #<issue-number>", or "resolves #<issue-number>" to automatically close issues when the PR is merged. -->

Review / Merge checklist

  • PR title and summary are descriptive. (conventions) <!-- **Remember, the title automatically goes into the changelog. Use `(no-changelog)` otherwise.** -->
  • Docs updated or follow-up ticket created.
  • Tests included. <!-- A bug is not considered fixed, unless a test is added to prevent it from happening again. A feature is not complete without tests. -->
  • PR Labeled with Backport to Beta, Backport to Stable, or Backport to v1 (if the PR is an urgent fix that needs to be backported)
© 2026 · via Gitpulse