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

22nd
Mar 2018
suren343
@suren343
Mar 22 2018 02:56
Hello everyone, i am trying a PUT for my endpoint , i am getting as no access control policy has been set up for service ,,,,, c.n.zuul.http.HttpServletRequestWrapper : Content-length different from byte array length! cl=-1, array=200
any clue abt the error
Fabian Wallwitz
@cforce
Mar 22 2018 08:49
where do i ask questions regarding spring reactive,webflux?
Tommy Ludwig
@shakuzen
Mar 22 2018 08:57
If it is about Project Reactor, they have their own gitter. If it is about things in Spring Framework, I think Stack overflow is the best place, probably.
Fabian Wallwitz
@cforce
Mar 22 2018 09:43
is there a way to retreive the configured hystrix properties per Hystrix Command based on the app ctx - i ned to export this settings per node->node edge
^at runtime
Jagmohan Sharma
@JagmohanSharma
Mar 22 2018 12:05
Hi Team,
I have one question around @RefreshScope. As we have certain bean definitions annotated with @RefreshScope including dataSource. On update from cloud config eg. consul property source, we get all @RefreshScope annotated beans recreated. Can this be achieved to not refresh dataSource bean on unrelated cloud config changes?
Dave Syer
@dsyer
Mar 22 2018 12:08
That's an unimplemented feature
There is usually some information about which config keys changed, but it isn't always reliable, and there isn't a direct link (APIwise) from config keys to bean instances.
So you could try implementing something, and see if it works. But I think it might turn into a bit of a chore.
What is it in the data source that needs to be refreshable?
Maybe you can do that some other way?
Jose Armesto
@fiunchinho
Mar 22 2018 15:26
when using Eureka client, to decide whether or not to use the hostname or the IP address of the service that you want to call, it's decided by the service receiving the call on the registration phase with preferIpAddress, right? It's not decided by the client that wants to call that service. Am I correct?
Spencer Gibb
@spencergibb
Mar 22 2018 15:27
correct, it's by the registering service
Jose Armesto
@fiunchinho
Mar 22 2018 15:37
thanks
Jacques-Etienne Beaudet
@jebeaudet
Mar 22 2018 16:10
Hi! Concerning https://stackoverflow.com/questions/49413389/why-is-formbodywrapperfilter-necessary-in-spring-cloud-zuul/49415221, have we thought of ditching com.netflix.zuul.http.HttpServletRequestWrapper in favor of a custom impl that would just buffer the input stream as a byte[] and no more than that (ditch the parameters buffering and the special handling of application/x-www-form-urlencoded requests) and disable the Servlet30RequestWrapperFilter along with the FormBodyWrapperFilter? I tried it on my end and it works but I'm wondering if I'm missing any details here. Thx for answering on SO btw :)
You mention that the dispatcher servlet is doing the buffering but I don't see that on my end btw (I only see HttpServletRequestWrapper doing that)
Spencer Gibb
@spencergibb
Mar 22 2018 16:50
yeah my bad on where buffering was happening
Jagmohan Sharma
@JagmohanSharma
Mar 22 2018 17:04
@dsyer can you suggest if it is a good practice to mark datasource as refresh scoped?
Dave Syer
@dsyer
Mar 22 2018 17:11
I think it's even the default with Spring Boot 2.0. It makes me a bit nervous.
We haven't really hit production with that feature yet.
It's the default because Hikari changed their implementation to barf if you changed the pool properties at runtime.
(Even if the value doesn't change in fact)
Jagmohan Sharma
@JagmohanSharma
Mar 22 2018 17:35
okk.
Jacques-Etienne Beaudet
@jebeaudet
Mar 22 2018 17:40
@spencergibb np, do you have any red flags with what I suggest?
Spencer Gibb
@spencergibb
Mar 22 2018 18:18
@jebeaudet for us, the tests would need to pass (the form ones)
Jacques-Etienne Beaudet
@jebeaudet
Mar 22 2018 18:20
alright, I've logged a story on my end to try it out with a feature flag, I'll contribute upstream if everything works out. With spring cloud gateway, is zuul in maintenance mode for for Finchley and next?
Spencer Gibb
@spencergibb
Mar 22 2018 18:21
pretty much
Jacques-Etienne Beaudet
@jebeaudet
Mar 22 2018 18:22
got it, thx again!
Nils Wild
@NilsWild
Mar 22 2018 19:06
Hey what would be a goof solution to share OAuthAccessTokens across service instances to prevent concurrency issues when the token expires?
John D Giotta
@jdgiotta
Mar 22 2018 19:52
I'm looking for an example of using kafka as the bus for Spring Cloud Config
I have the following
spring:
  cloud:
    bus:
      enabled: true
      trace:
        enabled: true
    stream:
      kafka:
        binder:
          zkNodes: localhost
          brokers: localhost
But I can't find an example to confirm and so far when I run the project is throws a Connection refused
Not sure if kafka and zookeeper are the problem or if my config is.
Nils Wild
@NilsWild
Mar 22 2018 20:27
@jdgiotta probably take a look at this example https://dzone.com/articles/spring-cloud-stream-with-kafka
Nils Wild
@NilsWild
Mar 22 2018 20:37
i think you are missing port