-
Notifications
You must be signed in to change notification settings - Fork 672
Open
Description
Background
Currently, we have two separate adapter services:
- HTTP Adapter: Responsible for posting messages.
- WebSocket Adapter: Responsible for subscribing to messages via WebSocket.
Since WebSocket is a protocol upgrade over HTTP, it is technically feasible to support both HTTP and WebSocket in a single service. This would simplify the architecture and reduce deployment overhead.
Goal
Merge WebSocket functionality into the existing HTTP adapter, allowing it to handle both:
- HTTP
POSTrequests for publishing messages (existing functionality) - WebSocket connections for subscribing to messages
Approach
We can achieve this by reusing the WebSocket handling logic from the existing WebSocket adapter and integrating it into the HTTP adapter service.
- Copy WebSocket-related code from the WebSocket adapter to the HTTP adapter.
- Add support for HTTP Upgrade requests (
Connection: UpgradeandUpgrade: websocket) in the HTTP adapter. - Ensure WebSocket clients can subscribe to topics just as they do with the standalone WebSocket adapter.
Benefits
- Reduced number of deployed services
- Simplified configuration and maintenance
- Unified endpoint for both publishing and subscribing
dborovcanin
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
🩺 Review and testing