diff --git a/scripts/base/frameworks/cluster/main.zeek b/scripts/base/frameworks/cluster/main.zeek index 6614e62273..3f3b222ce2 100644 --- a/scripts/base/frameworks/cluster/main.zeek +++ b/scripts/base/frameworks/cluster/main.zeek @@ -44,6 +44,13 @@ export { ## time machine nodes in a cluster. Used with broker-enabled cluster communication. const time_machine_topic = "zeek/cluster/time_machine" &redef; + ## A set of topic names to be used for broadcasting messages that are + ## relevant to all nodes in a cluster. Currently, there is not a common + ## topic to broadcast to, because enabling implicit Broker forwarding would + ## cause a routing loop for this topic. + const broadcast_topics = { logger_topic, manager_topic, proxy_topic, + worker_topic, time_machine_topic }; + ## The topic prefix used for exchanging messages that are relevant to ## a named node in a cluster. Used with broker-enabled cluster communication. const node_topic_prefix = "zeek/cluster/node/" &redef; diff --git a/scripts/base/frameworks/config/main.zeek b/scripts/base/frameworks/config/main.zeek index df0c40da17..f1c26ebe26 100644 --- a/scripts/base/frameworks/config/main.zeek +++ b/scripts/base/frameworks/config/main.zeek @@ -59,14 +59,8 @@ global Config::cluster_set_option: event(ID: string, val: any, location: string) function broadcast_option(ID: string, val: any, location: string) &is_used { - # There's not currently a common topic to broadcast to as then enabling - # implicit Broker forwarding would cause a routing loop. - Broker::publish(Cluster::worker_topic, Config::cluster_set_option, - ID, val, location); - Broker::publish(Cluster::proxy_topic, Config::cluster_set_option, - ID, val, location); - Broker::publish(Cluster::logger_topic, Config::cluster_set_option, - ID, val, location); + for ( topic in Cluster::broadcast_topics ) + Broker::publish(topic, Config::cluster_set_option, ID, val, location); } event Config::cluster_set_option(ID: string, val: any, location: string)