problem: ZMQ_HEARTBEAT is not useful without sending an hello message

When using ZMQ_HEARTBEAT one still needs to implement application-level heartbeat in order to know when to send a hello message.
For example, with the majordomo protocol, the worker needs to send a READY message when connecting to a broker. If the connection to the broker drops, and the heartbeat recognizes it the worker won't know about it and won't send the READY msg.
To solve that, the majordomo worker still has to implement heartbeat. With this new option, whenever the connection drops and reconnects the hello message will be sent, greatly simplify the majordomo protocol, as now READY and HEARTBEAT can be handled by zeromq.
This commit is contained in:
Doron Somech
2020-04-17 09:50:59 +03:00
parent 718ad8ab96
commit 93da6763b0
18 changed files with 260 additions and 2 deletions

View File

@@ -297,6 +297,10 @@ struct options_t
std::string wss_trust_pem;
std::string wss_hostname;
bool wss_trust_system;
// Hello msg
std::vector<unsigned char> hello_msg;
bool can_send_hello_msg;
};
inline bool get_effective_conflate_option (const options_t &options)