Skip to content

design: consolidate Connector and NotificationChannel into single outbound delivery SPI #5

@mdproctor

Description

@mdproctor

Problem

Two parallel outbound delivery SPIs exist with overlapping Slack and Teams implementations:

casehub-connectorsConnector SPI (id() + send(ConnectorMessage)):

  • Implementations: Slack, Teams, Twilio SMS, WhatsApp, Email
  • Consumers: none yet (no code in any repo calls Connector.send())
  • Trigger: not wired to any event

quarkus-work-notificationsNotificationChannel SPI (channelType() + send(NotificationPayload)):

  • Implementations: Slack, Teams, HTTP webhook
  • Consumer: NotificationDispatcher (wired to WorkItemLifecycleEvent)
  • Trigger: WorkItem lifecycle events only

Slack and Teams are implemented twice. As features grow — case fault notifications, stalled commitment alerts, escalation notifications — a third and fourth parallel implementation becomes likely.

Proposed resolution

casehub-connectors is the canonical outbound delivery primitive. It is lower-level (no WorkItem coupling), more complete (adds SMS, WhatsApp, Email), and correctly named.

quarkus-work-notifications's NotificationChannel implementations for Slack and Teams should be removed. NotificationDispatcher should delegate to a Connector instance (found via CDI @Any Instance<Connector>).

The NotificationChannel SPI can remain as the quarkus-work-level abstraction for rule matching and dispatch — but its implementations must delegate to Connector rather than calling outbound APIs directly.

This also unblocks: stalled Qhorus commitment alerts, case fault notifications, and escalation notifications — all of which need outbound delivery but currently have no wired path.

Affected repos

  • casehub-connectors — authoritative SPI (no changes needed)
  • quarkus-work-notificationsSlackNotificationChannel, TeamsNotificationChannel replaced with Connector-delegating wrappers
  • quarkus-qhorus — future WatchdogAlertSink SPI implementation would use Connector
  • casehub-engine — future case fault/timeout notifications would use Connector

Part of

#4 (platform coherence audit — finding #7)

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexity: HighSignificant unknowns, design requiredscale: MMulti-class / multi-file

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions