zeromq / netmq

A 100% native C# implementation of ZeroMQ for .NET
Other
2.95k stars 744 forks source link

problem: ZMQ_HEARTBEAT is not useful without sending an hello message #862

Closed somdoron closed 4 years ago

somdoron commented 4 years ago

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.

codecov[bot] commented 4 years ago

Codecov Report

Merging #862 into master will increase coverage by 0.08%. The diff coverage is 72.72%.

@@            Coverage Diff             @@
##           master     #862      +/-   ##
==========================================
+ Coverage   67.33%   67.41%   +0.08%     
==========================================
  Files         124      125       +1     
  Lines        8020     8028       +8     
  Branches     1313     1318       +5     
==========================================
+ Hits         5400     5412      +12     
+ Misses       2093     2086       -7     
- Partials      527      530       +3     
Impacted Files Coverage Δ
src/NetMQ/Core/Patterns/Pair.cs 72.00% <ø> (-2.08%) :arrow_down:
src/NetMQ/Core/Patterns/Pub.cs 75.00% <ø> (-5.00%) :arrow_down:
src/NetMQ/Core/Patterns/Pull.cs 91.66% <ø> (-1.20%) :arrow_down:
src/NetMQ/Core/Patterns/Push.cs 76.92% <ø> (-3.08%) :arrow_down:
src/NetMQ/Core/Patterns/Stream.cs 63.96% <ø> (-0.64%) :arrow_down:
src/NetMQ/Core/Patterns/Sub.cs 70.83% <ø> (-2.25%) :arrow_down:
src/NetMQ/Core/Patterns/XPub.cs 86.11% <ø> (-0.20%) :arrow_down:
src/NetMQ/Core/Patterns/XSub.cs 76.28% <ø> (-0.48%) :arrow_down:
src/NetMQ/Core/SocketBase.cs 67.51% <50.00%> (-0.46%) :arrow_down:
src/NetMQ/Core/Options.cs 76.71% <72.72%> (-0.22%) :arrow_down:
... and 14 more