-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Request and reply sockets use a custom Codec which, as the name implies, encodes and decodes messages. In particular, the messages are encoded using a prefix || header || payload format and decoded expecting such format. When a message is received and doesn't adhere to such format, the reply socket simply discards it. Connection is closed, and the client receives an empty reply.
It would be nice add some support for a basic ping/pong functionality. The rationale is some services may send health checks to an instance running an msg reply socket. So if we receive raw bytes containing the string "ping", we just answer "pong", skipping the work made by Codec.
It's still up for discussion what is the best implementation for this, but for sure a challenge is hijacking existing code to handle this edge case.