make pubsub topics configurable

Also for pubsub trips back to CV1/CV2, rather than having 2 queues for each service (networks & members), theres now only a single queue for each change type, and `frontend = (cv1|cv2)` attribute is set on the message for filtering.
This commit is contained in:
Grant Limberg 2025-09-18 09:33:04 -07:00
parent cb2de5aae1
commit 6113bad61e
10 changed files with 74 additions and 50 deletions

View file

@ -1822,6 +1822,14 @@ class OneServiceImpl : public OneService {
json& ps = cc["pubsub"];
_controllerConfig.pubSubConfig = new PubSubConfig();
_controllerConfig.pubSubConfig->project_id = OSUtils::jsonString(ps["project_id"], "");
_controllerConfig.pubSubConfig->member_change_recv_topic =
OSUtils::jsonString(ps["member_change_recv_topic"], "");
_controllerConfig.pubSubConfig->member_change_send_topic =
OSUtils::jsonString(ps["member_change_send_topic"], "");
_controllerConfig.pubSubConfig->network_change_recv_topic =
OSUtils::jsonString(ps["network_change_recv_topic"], "");
_controllerConfig.pubSubConfig->network_change_send_topic =
OSUtils::jsonString(ps["network_change_send_topic"], "");
}
if (_controllerConfig.listenMode == "pubsub" && ! _controllerConfig.pubSubConfig) {
fprintf(stderr, "ERROR: pubsub listenMode requires pubsub configuration in local.conf" ZT_EOL_S);