简体   繁体   English

使用 Eureka 自动发现服务

[英]Automatic Service Discovery with Eureka

is there a possibility to automatically discover services with Eureka?是否有可能使用 Eureka 自动发现服务? What I want to do is to have a service "Collect" which accepts a document.我想要做的是有一个接受文件的“收集”服务。 Additionally to this service there should be several other services which extract document data from the document.除了这个服务之外,应该还有其他几个从文档中提取文档数据的服务。 This could be a "TF-IDF" or a "MLT" service.这可以是“TF-IDF”或“MLT”服务。

As of now I would have to change the "Collect" service each time a new data extraction service is added.到目前为止,每次添加新的数据提取服务时,我都必须更改“收集”服务。 This is what I would like to automate so that after adding a data extraction service it is called automatically without changing the "Collect" service.这就是我想要自动化的,以便在添加数据提取服务后自动调用它而不更改“收集”服务。

Is there a way of achieving such an automatic service discovery or will I always have to modify the "Collect" service?有没有办法实现这种自动服务发现,或者我总是必须修改“收集”服务?

Kind regards亲切的问候

So I found the best way to solve this problem is it to have the services providing information extraction as a configuration.所以我发现解决这个问题的最佳方法是将提供信息提取的服务作为配置。 This way I can implement a loop in my Collect service and loop through each extraction service.这样我就可以在我的收集服务中实现一个循环并遍历每个提取服务。 The configuration is handles by a configuration service.配置由配置服务处理。 This is the clostest I can come to adding services withou performing any change to the Collect service.这是我可以在不对收集服务进行任何更改的情况下添加服务的最接近的方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM