Spring Cloud Bus, how to specify multiple destination in /bus/refresh?destination=?

1k views Asked by At

I have a config server that using Spring Cloud Config and Spring Cloud Bus and some clients that also have Spring Cloud Bus. Each time I change the config, I use postman to send /bus/refresh to the config server. I found two ways to do that:

  1. Refresh a specific client: http://localhost/bus/refresh/app1:dev:8080
  2. Refresh all clients: http://localhost/bus/refresh

Is there any way to refresh two specific clients with single post request?

2

There are 2 answers

0
spencergibb On

If you want to instances of the same service you could do http://localhost/bus/refresh/app1:dev:*.

0
Vivek Baranwal On

You can give multiple application name in single /bus/refresh?destination URL with & separated as below, it will refresh configuration of two specific mentioned applications(app1 and app2):

http://localhost/bus/refresh?destination=app1:&app2: