mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 04:28:20 +00:00
cluster/websocket: Automatic WebSocket client topic subscription
Subscribe every WebSocket client to a unique topic, by default under zeek/cluster/websocket/client/<identifier>/ Add tests that verify that WebSocket clients receive messages on these topics even if they didn't explicitly pass them in their handshake message. This is somewhere between feature and bug fix. It aids the ZeroMQ backend implementation: A WebSocket client that doesn't provide any subscriptions and immediately starts publishing would discard events until receiving other nodes subscriptions from the central XPUB/XSUB proxy. ZeroMQ does sender side topic filtering. When using subscriptions, the client waits until its own subscriptions are returned from the central XPUB/XSUB proxy, thereby also learning about other node's subscriptions. Also, make the no-subscriptions.zeek test use 32 clients sequentially to trigger potential issues more quickly.
This commit is contained in:
parent
69a1ad2c3d
commit
8edec9885a
17 changed files with 352 additions and 19 deletions
|
@ -261,6 +261,7 @@ redef Cluster::worker_pool_spec = Cluster::PoolSpec(
|
|||
$topic = "zeek.cluster.pool.worker",
|
||||
$node_type = Cluster::WORKER);
|
||||
|
||||
redef Cluster::websocket_topic_sep = ".";
|
||||
|
||||
# Configure listen_log_endpoint based on port in cluster-layout, if any.
|
||||
@if ( Cluster::local_node_type() == Cluster::LOGGER || (Cluster::manager_is_logger && Cluster::local_node_type() == Cluster::MANAGER) )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue