diff --git a/docs/requirements/Component-Communication.md b/docs/requirements/Component-Communication.md index 2a6472a..8479424 100644 --- a/docs/requirements/Component-Communication.md +++ b/docs/requirements/Component-Communication.md @@ -2,7 +2,7 @@ ## Purpose -The Communication component manages all messaging between the central cluster and site clusters. It provides the transport layer for deployments, instance lifecycle commands, integration routing, debug streaming, health reporting, and remote queries (parked messages, event logs). Two transports are used: **Akka.NET ClusterClient** for command/control messaging and **gRPC server-streaming** for real-time data (attribute values, alarm states). +The Communication component manages all messaging between the central cluster and site clusters. It provides the transport layer for deployments, instance lifecycle commands, integration routing, debug streaming, health reporting, notification submission, and remote queries (parked messages, event logs). Two transports are used: **Akka.NET ClusterClient** for command/control messaging and **gRPC server-streaming** for real-time data (attribute values, alarm states). ## Location @@ -124,6 +124,13 @@ Keepalive settings are configurable via `CommunicationOptions`: - Central can also send management commands: - Retry or discard parked messages. +### 9. Notification Submission (Site → Central) +- **Pattern**: Fire-and-forget with acknowledgment. +- The site **Store-and-Forward Engine** sends a `NotificationSubmit` message to central carrying the notification — `NotificationId`, target list name, subject, body, and source provenance. +- Central ingests the submission with an insert-if-not-exists on `NotificationId` and acknowledges **after the row is persisted** to the `Notifications` table in the central configuration database. The site S&F engine clears the buffered message only on that ack. +- The `NotificationId` GUID — generated at the site — is the **idempotency key**. The handoff is at-least-once: a re-sent submission after a lost ack is harmless because central's insert-if-not-exists treats the duplicate as a no-op. +- **Transport**: ClusterClient (site→central command/control), consistent with how other site→central messages are sent. + ## Topology ``` @@ -174,6 +181,7 @@ Each request/response pattern has a default timeout that can be overridden in co | 4. Integration Routing | 30 seconds | External system waiting for response; Inbound API per-method timeout may cap this further | | 5. Recipe/Command Delivery | 30 seconds | Fire-and-forget with ack | | 8. Remote Queries | 30 seconds | Querying parked messages or event logs | +| 9. Notification Submission | 30 seconds | Fire-and-forget with ack; central acks after persisting the row | Timeouts use the Akka.NET **ask pattern**. If no response is received within the timeout, the caller receives a timeout failure.