Questions tagged [spring-cloud-consul]

Spring Cloud Consul provides Consul integrations for Spring Boot apps through autoconfiguration and binding to the Spring Environment and other Spring programming model idioms.

Spring Cloud Consul features:

  • Service Discovery: instances can be registered with the Consul agent and clients can discover the instances using Spring-managed beans
  • Supports Ribbon, the client side load-balancer via Spring Cloud Netflix
  • Supports Zuul, a dynamic router and filter via Spring Cloud Netflix
  • Distributed Configuration: using the Consul Key/Value store
  • Control Bus: Distributed control events using Consul Events

https://cloud.spring.io/spring-cloud-consul/

154 questions
0
votes
0 answers

spring-cloud.version to be used for spring boot version 2.6.6

Spring-boot-starter-parent version:2.6.6 I want to know the required spring-cloud.version and also the spring-cloud-starter-consul-config dependency in detail. I have imported some sample Maven project to go through spring consul. The…
0
votes
0 answers

Load Balancer with Spring WebClient and Consul

Hi I'm building an application which using spring-webflux and consul. Now I choose WebClient for internal service communication. However I don't how make WebClient load balance using service discovery. Is anyway I can archive this? Here is my…
0
votes
0 answers

Distributed lock & leader election -- how to ensure leader only does work when it holds lock?

When using a distributed lock library for example Consul to implement leader election ( there are 2 nodes consuming messages. However only 1 of them must acquire a lease on a distributed lock and become leader and actually process messages. The…
0
votes
0 answers

Consul is not round robin balancing the multiple service Instances

I have local Consul (consul agent -server -bootstrap -config-file="config/config.json") running. I am running a Spring GrapghQL microservice which when asked will use an endpoint in a second Spring microservice(summerizer). I am running 3 instances…
Jurb
  • 1
  • 1
0
votes
1 answer

Spring Boot App doesn't update new value from consul

I'm working with a SpringBoot app and try to update new value from consul server when the config is changed. Follow the document from Spring Cloud but can not update new value without restarting the spring boot application. Here is the bootstrap.yml…
Phong DLL
  • 1
  • 3
0
votes
0 answers

Failed to run spring-boot-consul client in weblogic

I am trying to register all the manage servers running in WebLogic 12 in Consul Discovery Server. In order do do that, I create a war project with spring-cloud-consul dependency. This is a spring-boot application. application run with each manage…
Angelo G
  • 1
  • 2
0
votes
1 answer

Why is my Spring Consul Retry configuration not working

I am trying to use retry functionality in spring consul so that the application fail-fast after certain number of retries. I am using following bootstrap.yml spring: profiles: active: dev application: name: consultest cloud: …
Arbaz Sheikh
  • 217
  • 2
  • 10
0
votes
0 answers

How to retry indefinitely while connecting spring boot application to consul

We use Consul by HashiCorp for configuration management in our spring boot application. Sometimes consul agent is occasionally unavailable when our app starts. It is inconvenient that the app fails if consul isn’t available for configuration. I read…
Arbaz Sheikh
  • 217
  • 2
  • 10
0
votes
1 answer

Spring-cloud-consul backward compatibility of property value parsing for "spring.cloud.consul.host" broken in spring-cloud-consul version 3.1.1

After upgrading my spring-boot application that uses Consul, I observe backward compatibility is broken. Spring boot upgraded from spring-boot:2.1.4.RELEASE to spring-boot:jar:2.7.3. Earlier spring-cloud-consul used to work with bootstrap property…
0
votes
0 answers

Spring cloud Consul for non spring boot web app

I have microservice written in spring boot that is not web app (no spring-boot-starter-web dependency). It consumes event from message bus and do some other calculation not related to web request at all. Still I want it to be registered with…
user1409534
  • 2,140
  • 4
  • 27
  • 33
0
votes
0 answers

What's the best practice to deploy consul client/agent in kubernetes?

I'm new to consul and in my understanding consul client is a lightweight and stateless agent for services to register themselves and query target services. From consul-helm I found consul-client is deployed by a DaemonSet so every node will has a…
shizhz
  • 11,715
  • 3
  • 39
  • 49
0
votes
0 answers

How to check consul service health if there is space in the name and tag both

I want to fetch service health information from consul. How can I search a service with curl cmd when there is space in their name and tag both one more question is curl --get http://127.0.0.1:8500/v1/health/checks/$service will check for service…
0
votes
1 answer

Spring Boot app doesn't read configuration from Consul if started before Consul

When I start Consul, then the app, and then create some configuration, the app would read it and apply at runtime. However if the app is started before Consul it wouldn't be able to read the configuration and its changes. According to the official…
ka3ak
  • 2,435
  • 2
  • 30
  • 57
0
votes
0 answers

Dependency 'org.springframework.cloud:spring-cloud-starter-consul-discovery:' not found

I am following the spring cloud consul documentation on version 3.1.0 and I was trying to replicate the step by step documentation, in which it shows this set of dependencies to be applied, one of them is this spring-cloud-starter-consul-discovery,…
0
votes
0 answers

How do I set the spring active profile using consul?

I have a consul env: spring: profiles: active: dev blah blah other stuff I've verified that the consul env properties are being read by the spring app (it locates the right property source and I can see that its reading properties in other…
Bryan Tan
  • 221
  • 1
  • 11