We have updated our zuul service to Hoxton release recently. As per the documentation, if we use yml file for routes the order will be preserved but After the update we noticed that the zuul routing order is lost when the routes are fetched from config server but if we have the routes as part of application it is working as expected.
For eg below is our sample routing config
zuul:
routes:
specificproduct:
path: /v1/product/electronics/**
service-id: electronic-product-service
strip-prefix: false
sensitiveHeaders:
genericproduct:
path: /v1/product/**
service-id: product-service
strip-prefix: false
sensitiveHeaders:
In our case, if the routes are fetched from config server the requests are always forwarded to product-service instead of electronic-product-service even the path is /v1/product/electronics/** This works as expected when we have the route config as part of application and disable config server.
Comment From: spencergibb
Can you provide a complete, minimal, verifiable sample that reproduces the problem? It should be available as a GitHub (or similar) project or attached to this issue as a zip file.
Comment From: sureshkrishnamoorthy
@spencergibb Attached the projects to replicate the issue, In this zuul routing order is not consistent for the same routes defined in embedded config (in zuul app) and config server yml configuration.
spring:
cloud:
config:
enabled: false
Toggling the above property in zuul, provides different routing order. Please check and let us know how retain the routing order when the routes are served from config server.
Comment From: sureshkrishnamoorthy
@spencergibb Hope you were able to reproduce the issue using the sample project that was uploaded. Please suggest the solution or any work around to overcome this issue.
Comment From: spencergibb
I have not, yesterday was my first day back after holiday
Comment From: spencergibb
I've verified this is an issue, though I'm not sure if the issue is here, config client or spring cloud commons.
Comment From: masulum
I've verified this is an issue, though I'm not sure if the issue is here, config client or spring cloud commons.
i am experience the same, after i put routes in config server. routing such example above wasn't working properly.
Comment From: spencergibb
Hoxton.SR3 hasn't been released yet, hopefully tomorrow.