spring-attic / gs-routing-and-filtering

Routing and Filtering :: Learn how to route and filter requests to a microservice using Netflix Zuul
https://spring.io/guides/gs/routing-and-filtering
67 stars 85 forks source link

how to dynamic route and add route info not start app #1

Closed damozhiying closed 8 years ago

damozhiying commented 8 years ago

Not sure where should I put this question. I have a zuul filter and I am trying to do conditional routing. I am looking for API where I can override route configuration and route the traffic. Example

2 services ( Store and Customer) If request body has amount greater than $5000, then redirect traffic to Store else customer. I am stuck and trying to find api on which I can customize routing. I tried ZuulRoute and didn't find how to use in spring cloud.

if(price > 5000) { // Go to service version 1- Customer 1.0

} else { // Go to service version 2- Customer 2.0 }

And I want to store and define all route remotely, not in yaml file.

dsyer commented 8 years ago

Probably better to go to one place (Stackoverfow is best for usage questions), rather than spamming multiple different, connected forums. The question is definitely not related directly to the content of this guide, so I'm going to close this and you can listen for responses in one of your other locations.