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

6th
Apr 2018
mebrookbank
@mebrookbank
Apr 06 2018 09:26
We're looking at migrating from spring-cloud-eureka to use the spring-cloud-kubernetes (https://github.com/spring-cloud-incubator/spring-cloud-kubernetes). Can anyone tell me if/when this might move from an incubator project to become part of spring-cloud?
Carlos Barragan
@carlosbarragan
Apr 06 2018 11:47
Hello, I was wondering how Hystrix is configured when using the reactive web client in SpringBoot 2.0 ? Does it default to SEMAPHORE isolation automatically? I could not find anything about it in the docs (perhaps I could not find the right doc ;) )
Konstantin Bläsi
@konstantinblaesi
Apr 06 2018 12:01
when getting a datasource with connectionFactory().dataSource() on spring cloud with cloud foundry how do you set parameters like maxActive, maxIdle, etc.? Our codebase used to create a BasicDataSource and set all options using values from a properties file. Cloud foundry gives me a DataSource which does not offer setters like setMaxActive, setMaxIdle, etc.
I was following https://docs.run.pivotal.io/buildpacks/java/configuring-service-connections/spring-service-bindings.html with regards to cloud foundry integration of spring
Andre Dörnbrack
@doernbrackandre
Apr 06 2018 12:03
@mebrookbank currently, @Salaboy and me working on it. Unfortunately, I don't know if there is a timeline. Maybe @spencergibb ?
salaboy
@salaboy
Apr 06 2018 12:04
@doernbrackandre I will get back to your comment when I manage to finish something that I need to get done asap
sorry for the delay
Andre Dörnbrack
@doernbrackandre
Apr 06 2018 12:04
@Salaboy ya, sure. thanks :)
no worries
Thiago Locatelli
@thiagolocatelli
Apr 06 2018 12:16
A couple of days ago I posted question regarding the possibility of changing the endpoint provided in the uri() method when creating a route with spring-cloud-gateway, after many attempts on trying to do that (mutating the request in a "pre" filter, is one of them) I can't find a way to do that. Is this something possible to achieve?
Marcos Barbero
@marcosbarbero
Apr 06 2018 12:41
@konstantinblaesi in this doc there's a example how to do that using Redis, as it uses an abstraction the very same class can be used for your usecase.
Konstantin Bläsi
@konstantinblaesi
Apr 06 2018 14:38

@marcosbarbero seems like I can do a new PooledServiceConnectorConfig.PoolConfig(0, 50, 30); as a replacement for setMaxActive and setMaxIdle. But I am settings more options, such as

final BasicDataSource ds = new BasicDataSource();
ds.setDriverClassName(driverClassName);
ds.setUrl(url);
ds.setUsername(username);
ds.setPassword(pasword);
ds.setMaxActive(poolMaxSize);
ds.setMaxIdle(poolMaxSize);
ds.setTestOnBorrow(testOnBorrow);
ds.setValidationQuery(validationQuery);
ds.setRemoveAbandoned(removeAbandoned);

I didn't see ways to set options such as testOnBorrow, yet.

Spencer Gibb
@spencergibb
Apr 06 2018 17:04
@mebrookbank no change in default. Still defaults to threadpool, but you can change the default with a single line of configuration
sorry that was for @carlosbarragan
@mebrookbank we are going to migrate it from incubator during the Greenwich release train
Thiago Locatelli
@thiagolocatelli
Apr 06 2018 17:06
@konstantinblaesi I think you may have to use PoolProperties object to set the testOnBorrow, and then create the datasource and provide the poolProperties.