spring-cloud / spring-cloud-bus

Spring Cloud event bus
http://cloud.spring.io/spring-cloud-bus/
Apache License 2.0
407 stars 241 forks source link

Add Gateway routes refresh support #57

Open JWThewes opened 7 years ago

JWThewes commented 7 years ago

We're using a config server and Spring Cloud Bus to distribute a RefreshRemoteApplicationEvent. This works fine so far. When our Zuul Proxy receives the event with changed routes they don't get loaded. I've solved this by adding my own RefreshListener which does the following: zuulHandlerMapping.setDirty(true);

After adding this the refresh works fine and new routes are added.

We're on Cameden SR5. It's quite a simple setup. One config server. One Zuul server. One RabbitMQ.

To reproduce add a route to the config and invoke the /monitor endpoint on the configserver. The Zuul gets triggered but the routes are not changed.

If you need any further information feel free to ask anytime.

spencergibb commented 4 years ago

Updating this for gateway as zuul is no longer maintained.