Spring cloud config client make default value isn't overwrite - spring-cloud-config

Im working with Spring Cloud Config and Spring Cloud Bus, I just want my default config like database connection, kafka connection... in Client isn't overwrite even if the Server have that config.
How can I do that? sorry for my bad English, thank you!!

Related

Spring Cloud Stream RabbitMQ - Partitioning using header instead of routing key

I was going through the documentation but couldn't find anything related to this, so I'm here just to confirm with you.
We'd like to partition Rabbit queues using Spring Cloud Stream, but would like to do so without using routing keys for it. Is there a way to do it by using headers or properties in the messages?
RabbitMQ plugins allow this but, does spring cloud stream allow it in some way?
Thanks and regards.
You can manually provision whatever exchange type you want and set the declareExchange property to false.

PCF / Cloud connector for Rabbit management API

All,
I'm running a simple SpringBoot app in PCF using a Rabbit on-demand service. The auto reconfiguration of the ConnectionFactory for the internal Rabbit service works just fine.
However I need a list of all queues on the Rabbit host. AFAIK this is only available through a call to the Rabbit management plugin (a REST API), see RabbitManagementTemplate::getQueues. This class expects an http URI with credentials.
I know the URI+credentials are exposed through the vcap.service variables as "http_api_uri', but I wonder if there's a more elegant way to get an instance of RabbitManagentTemplate with Spring magic cloud connectors / auto reconfiguration instead of manually reading the env vars and writing custom bean config.
It seems the ConnectionFactory only knows about the AMQP interface, and cannot create a RabbitManagementTemplate?
Thanks!
Spring Cloud Connectors won't help you here. It doesn't support setting up RabbitManagementTemplate, only a ConnectionFactory.
You don't have to parse the env yourself, you can use the flattened properties that Boot provides such as vcap.services.rabbitmq.credentials.http_api_uri. But you'll need to configure a RabbitManagementTemplate yourself using those Boot properties.

Ktor application with spring config server

wanted to try some new stuff and decided to build next micro-app in Ktor + Koin + Exposed. Everything looks really nice but I found one problem that is actually destroying the whole idea.
App needs DB access and the connection cannot be stored within repository but should be encrypted on config-server. Every other micro-app is suing spring boot and fetches configs with lib spring-cloud-config-client but I don't know if it's even possible to use that somehow from Ktor app. Anyone had the same problem and managed to fix it somehow?
Cfg4j seems to be an alternative to Spring Cloud Config Server.
https://github.com/cfg4j/cfg4j
Other than that, there are a few articles and some questions on SO about integrating Spring Cloud Config Server with non Spring Boot projects.
Spring Cloud Config Client Without Spring Boot
Also, I am working on an external configuration parser for Kotlin and am considering to implement similar functionality.

Spring Cloud Config Client re-loading config every 30 seconds

I'm working to enable the use of Spring Cloud Config and have everything working. However, I'm seeing INFO messages in my service app logs that shows that the Cloud Config Client is looking to re-load the configuration from the server about every 30 seconds. I cannot find anything in the docs or even in the code to suggest why this is happening. I really don't want my services polling the config server nearly that often, and ideally I'd like to turn it off, so I have some more control over when a config refresh happens.
Anyone have any ideas?
When the \health endpoint is called on a config client, it reaches out to the config server to pull new configuration. Service discovery tools like Eureka or Consul poll said endpoint, causing this issue.
You can stop the config client from reaching out to the config server by setting this property in your bootstrap.yml/bootstrap.properties:
health.config.enabled=false
Taken from here

spring cloud bus rabbitmq

We're using spring cloud config server. Spring config clients get updates using spring control bus (RabbitMQ).
Looks like every config client instance creates a queue connected to the 'spring.cloud.bus' exchange.
Any scalability limits on how many app instances can connect to a 'spring.cloud.bus' exchange ?
I suppose RabbitMQ could be scaled to handle this.
Looking for any guidelines on this.
Many thanx,
The spring cloud config server can have multiple instances since it is stateless. That coupled with a RabbitMQ cluster should scale to a very large number of instances.
A viable solution would be spring cloud config behind a load balancer with a RabbitMQ cluster.