Route Kanban Notifications Through Profile-Owned Gateways

In a multi-profile Hermes deployment, task dispatch and notification delivery are related but separate responsibilities. Keep exactly one dispatcher owner, then let each profile-owned gateway deliver updates for the adapters it hosts.

Separate the two ownership models

Only one gateway should run with kanban.dispatch_in_gateway: true. That process owns dispatch coordination and prevents competing workers from claiming the same ready task.

Notification routing follows the profile stamped on the subscription. If a task starts from a writer profile's Telegram adapter, the writer gateway can deliver its status even when the default profile gateway performed the dispatch. Legacy subscriptions without a profile stamp are delivered only by the dispatcher-lock owner. Atomic event claims prevent two gateways from sending the same update.

Configuration checklist

  • Choose one dispatcher-owning profile.
  • Confirm every other gateway has dispatch disabled.
  • Verify each messaging adapter is hosted by the intended profile.
  • Create a test subscription from each relevant profile.
  • Record the task, subscription, and delivery profile without exposing message content.
  • Keep legacy unstamped subscriptions visible during migration.

Common pitfalls

  • Enabling dispatch everywhere. Multiple gateways should not compete for dispatcher ownership.
  • Assuming the dispatcher must send every notification. Delivery follows adapter ownership when the subscription is stamped.
  • Treating legacy routing as proof of the new model. Unstamped subscriptions intentionally fall back to the lock owner.
  • Testing only task execution. A completed task can still have a broken delivery route.

Verification

Create one harmless task from each intended messaging profile. Confirm a single worker claims each task, the correct profile gateway sends each status update, and no event is duplicated. Restart one non-dispatch gateway and verify its profile-scoped delivery resumes without transferring dispatcher ownership.

Official reference: Hermes Kanban.