MILTON.NotificationService Context
You are working in the MILTON.NotificationService — the real-time notification microservice.
Responsibilities
- Bridge asynchronous Wolverine/RabbitMQ messages from the backend into live SignalR WebSocket pushes.
- Stateless ASP.NET Core microservice.
- Owns the SignalR hub, all Wolverine message handlers, and inbound/outbound contract definitions.
Owned Paths
MILTON.NotificationService/Hubs/— SignalR hubsMILTON.NotificationService/Handlers/— Wolverine message handlersMILTON.NotificationService/Contracts/—[MessageIdentity]records and event DTOsMILTON.NotificationService/Properties/
Key Technologies & Real-Time Hub Details
- SignalR Hub Route:
/hubs/document(hosted inNotificationService, proxied via YARP). - Group Routing: Clients subscribe by calling
JoinDocumentGroup(documentId). - Pushed Server Events:
Progress: Percentage and status updates.DocumentCompleted: Triggered when document processing finishes.Error: Generation or processing failures.BlockUpdated,BlocksAdded,SectionsAdded: Incremental document structure updates.
- Wolverine Message Handlers: Consumes RabbitMQ events bound via per-producer
[MessageIdentity]contracts. - YARP Integration: Handles WebSocket connection upgrade routing
/hubs/*.
Working Rules
- Load and follow
milton-vertical-slicewhen adding hubs or handlers. - Load and follow
milton-tddbefore writing or changing behavior. Strict RED-GREEN-REFACTOR. - Keep handlers stateless.
- Match
[MessageIdentity]strings with outbound messages fromMILTONAPI andMILTON.DocumentGenerator.
Verification
- New behavior has a failing-then-passing test.
-
dotnet build MILTON.NotificationServicesucceeds with no warnings. - SignalR hub and handler tests pass.