mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 03:28:19 +00:00
cluster/zeromq: Improve XPUB stall behavior, add a metric
Instead of fprintf, track the number of occurrences via a metric and change the sleep loop to a blocking send instead.
This commit is contained in:
parent
33d7e5a7bf
commit
bfffc8dac8
2 changed files with 40 additions and 14 deletions
|
@ -10,7 +10,15 @@
|
|||
#include "zeek/cluster/Serializer.h"
|
||||
#include "zeek/cluster/backend/zeromq/ZeroMQ-Proxy.h"
|
||||
|
||||
namespace zeek::cluster::zeromq {
|
||||
|
||||
namespace zeek {
|
||||
|
||||
namespace telemetry {
|
||||
class Counter;
|
||||
using CounterPtr = std::shared_ptr<Counter>;
|
||||
} // namespace telemetry
|
||||
|
||||
namespace cluster::zeromq {
|
||||
|
||||
class ZeroMQBackend : public cluster::ThreadedBackend {
|
||||
public:
|
||||
|
@ -105,6 +113,9 @@ private:
|
|||
// Tracking the subscriptions on the local XPUB socket.
|
||||
std::map<std::string, SubscribeCallback> subscription_callbacks;
|
||||
std::set<std::string> xpub_subscriptions;
|
||||
|
||||
zeek::telemetry::CounterPtr total_xpub_stalls;
|
||||
};
|
||||
|
||||
} // namespace zeek::cluster::zeromq
|
||||
} // namespace cluster::zeromq
|
||||
} // namespace zeek
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue