/pubsub-project

A service that broadcasts messages from producers to consumers. The backend is implemented in Beast C++, Spring Java, the client-side is in TypeScript.

Primary LanguageJavaMIT LicenseMIT

PubSub Project

Publish messages to a channel and broadcast them to all subscribers.

Implementations

Protocol

The client and server communicate via WebSocket.

WebSocket URLs:

  • Publisher: /<channel-name>/pub
  • Subscriber: /<channel-name>/sub

The server will respond with a message containing the ping duration in milliseconds, represented as a hexadecimal value. After this duration has passed since the last message was sent or received, the server will send a ping frame to the client.

The publisher client can send messages to be broadcast, which will be received by all subscriber connections.

The system uses at-most-once message delivery semantics.