Skip to content

Basic ping-pong support in req/rep #139

@thedevbirb

Description

@thedevbirb

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions