These are chat archives for spring-cloud/spring-cloud

11th
Sep 2015
Tommy Ludwig
@shakuzen
Sep 11 2015 05:04
Is using Spring Cloud Config and Spring Cloud Bus to do a bus refresh of all instances of a particular service possible without using Eureka?
Spencer Gibb
@spencergibb
Sep 11 2015 05:48
Yes
Tommy Ludwig
@shakuzen
Sep 11 2015 05:49

I guess I was thrown off by this in the documentation:

The bus currently supports sending messages to all nodes listening or all nodes for a particular service (as defined by Eureka).

I would just need to make sure the Application Context ID is unique by setting spring.application.index to something different on each instance, correct?
With them all having the same spring.application.name, that is.
Dave Syer
@dsyer
Sep 11 2015 05:54
Yes. I guess we should change the docs a bit.
It does correspond to the eureka coordinates, but doesn't require the use of service discovery.
You don't have to set the "index" (implies it is a sequence which is a headache) I think. The context ID will use other data (I forget the details)
Tommy Ludwig
@shakuzen
Sep 11 2015 05:57
Documentation mentions it uses the port, but I'm thinking the port will probably be the same on the different servers for the instances, in my case.
Dave Syer
@dsyer
Sep 11 2015 05:58
The ID is set in Spring Boot
But there are several options I believe
I usually see a random hash kind of iD
Must come from somewhere
Looks like index is it
I must be thinking of something else
Dave Syer
@dsyer
Sep 11 2015 06:03
spring.application.index=${random.value}
Now is a good time to make changes in Boot I guess if we need it. Not sure we do really, now I have all the data.
Tommy Ludwig
@shakuzen
Sep 11 2015 08:32
@dsyer Thanks for looking into it for me. I will try it out. Honestly I'd like to use Eureka and the whole Spring Cloud shebang from the beginning, but in some ways it is easier to convince management with a little-by-little introduction. Even though a lot of the benefit comes with using them all together on a lot of microservices. So, I'm working on starting with at the very least Spring Cloud Config (and Spring Cloud Bus for refreshing multiple instances at the same time).
Dave Syer
@dsyer
Sep 11 2015 08:33
Cool
I'm working on a bus/config link as well so you can push config changes from the config server
It might rely on web hooks from the git provider
Tommy Ludwig
@shakuzen
Sep 11 2015 08:35
I was asked by one of the managers about pushing from the config server during the review meeting, so there does seem to be some interest for that. Though with our current release method, we generally want to confirm on one instance before changing on the rest.
Tommy Ludwig
@shakuzen
Sep 11 2015 10:33
By the way, http://cloud.spring.io/spring-cloud-bus/ seems to be broken somehow. The versions and links to reference/API documentation as well as the example including with Maven/Gradle.
Dave Syer
@dsyer
Sep 11 2015 10:37
Oops
Try now
Tommy Ludwig
@shakuzen
Sep 11 2015 10:37
Looks good :)