Service selection specific for each REST call based on business requirement #419
-
The video example about Stork with heroes and villains called Service Discovery with SmallRye Stork and Quarkus was very good. Thank you very much for making it. My question is about Imagine a fake example @GET
@Path("/random")
Uni‹Hero> findRandomHero(@Selector String favorite); Is something like this possible to do or implement with Stork and is it a good idea to use it to select servers based on business requirements? I may in the distant future need multiple instances of heroes-starwars and load balancing but for now, I only need a way to call these APIs on different URL addresses. I actually want the request to fail if there are 0 services available at a particular address. What's your take on this? How would you approach this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The service selection has access to the request scope data, so, you can achieve something similar by adding to the request scope the information you need to drive your selection. |
Beta Was this translation helpful? Give feedback.
The service selection has access to the request scope data, so, you can achieve something similar by adding to the request scope the information you need to drive your selection.