Skip to content

Static List Service Discovery#

In some situations, such as demos, development, or testing, you may want to mock the service discovery by providing a predefined list of service instances. For this purpose, Stork comes with a static service discovery type.

Dependency#

To use the static service discovery, first add the appropriate Service Discovery provider dependency to your project:

<dependency>
    <groupId>io.smallrye.stork</groupId>
    <artifactId>stork-service-discovery-static-list</artifactId>
    <version>1.1.2</version>
</dependency>

Configuration#

For each service that should use the static list of service instances configure the service discovery type:

stork.my-service.service-discovery.type=static
stork.my-service.service-discovery.address-list=localhost:8080,localhost:8081
quarkus.stork.my-service.service-discovery.type=static
quarkus.stork.my-service.service-discovery.address-list=localhost:8080,localhost:8081

These are all the static service discovery parameters: