Is it possible to query NetworkMapService to get the list of all the nodes in the network to use it in the flow logic?
Is it also possible to register arbitrary information or meta data to the NetworkMapService about the node?
The use-case is to find out the nodes with certain responsibilities or abilities and send out request to those nodes.
答案 0 :(得分:0)
您可以按如下方式提取网络上所有节点的列表:
val allNodes = serviceHub.networkMapCache.allNodes
节点无法使用网络映射注册其他元数据。在以前的版本中,节点可以宣传他们运行的“服务” - 例如oracle服务或监管服务。现在已经弃用了。将来,我们希望您能够将配置文件传递给节点,告诉它哪些节点用于哪些服务。在此期间,您必须指定要按名称显式使用的节点(可能作为流的参数)。