Fix Broker topics used to uniquely identify cluster nodes

Node-specific topic prefix subscriptions/publications now add a trailing
slash like "zeek/cluster/node/<name>/".  Without the trailing slash,
messages attempting to target "proxy-10" may also be sent to "proxy-1"
since subscription matching is prefix-based.
This commit is contained in:
Jon Siwek 2020-04-10 14:36:00 -07:00
parent 714e2f736a
commit ce9183a2ed
8 changed files with 203 additions and 200 deletions

View file

@ -298,12 +298,12 @@ function local_node_type(): NodeType
function node_topic(name: string): string
{
return node_topic_prefix + name;
return node_topic_prefix + name + "/";
}
function nodeid_topic(id: string): string
{
return node_topic_prefix + id;
return nodeid_topic_prefix + id + "/";
}
event Cluster::hello(name: string, id: string) &priority=10