Component Spec: Messaging Migration Strategy
Goalβ
Move all messaging traffic from Socket.IO conventions to NATS subject conventions while preserving functional behavior.
Migration Targetsβ
trade-servicepublisher pathtrade-processorconsumer/publisher path- frontend stream subscriber path
Phased Approachβ
- Define subject map and payload compatibility (
system/messaging-subject-map.md). - Implement backend NATS clients and event flow.
- Implement frontend
nats.wssubscription for account-scoped updates. - Remove Socket.IO trade-feed dependencies and runtime component.
Compatibility Guardrailβ
Business workflows remain unchanged; only transport and routing semantics change.