Change supervisor event response topic names

They now include the request ID at the end of their topic, to possibly
help with subscription filtering.
This commit is contained in:
Jon Siwek 2019-10-21 09:16:26 -07:00
parent 7a6355f64f
commit 25a8ba99fa

View file

@ -24,28 +24,28 @@ event Supervisor::stop_request()
event Supervisor::status_request(reqid: string, nodes: string)
{
local res = Supervisor::status(nodes);
local topic = Supervisor::topic_prefix + "/status_response";
local topic = Supervisor::topic_prefix + fmt("/status_response/%s", reqid);
Broker::publish(topic, Supervisor::status_response, reqid, res);
}
event Supervisor::create_request(reqid: string, node: Node)
{
local res = Supervisor::create(node);
local topic = Supervisor::topic_prefix + "/create_response";
local topic = Supervisor::topic_prefix + fmt("/create_response/%s", reqid);
Broker::publish(topic, Supervisor::create_response, reqid, res);
}
event Supervisor::destroy_request(reqid: string, nodes: string)
{
local res = Supervisor::destroy(nodes);
local topic = Supervisor::topic_prefix + "/destroy_response";
local topic = Supervisor::topic_prefix + fmt("/destroy_response/%s", reqid);
Broker::publish(topic, Supervisor::destroy_response, reqid, res);
}
event Supervisor::restart_request(reqid: string, nodes: string)
{
local res = Supervisor::restart(nodes);
local topic = Supervisor::topic_prefix + "/restart_response";
local topic = Supervisor::topic_prefix + fmt("/restart_response/%s", reqid);
Broker::publish(topic, Supervisor::restart_response, reqid, res);
}