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

16th
Nov 2017
Grzegorz Poznachowski
@poznachowski
Nov 16 2017 10:34
Can anybody help me with https://stackoverflow.com/questions/46366071/change-feignclient-url-at-runtime ? I'd like to have annotated @FeignClient which url can be changed at runtime (using Spring Config Server and /refresh)
this doesn't work?
image.png
Grzegorz Poznachowski
@poznachowski
Nov 16 2017 10:46
Placeholder works, but if I change its value in config server and refresh the environment, the change is not reflected. I tried adding @RefreshScope on the client, but it didn't help.
Marcin Grzejszczak
@marcingrzejszczak
Nov 16 2017 10:47
ah, I see
use @LoadBalanced RestTemplate ;)
Grzegorz Poznachowski
@poznachowski
Nov 16 2017 10:48
darn, I like Feign so much :)
Marcin Grzejszczak
@marcingrzejszczak
Nov 16 2017 10:49
I don't know if this can be done. I guess we'll have to wait for @spencergibb or @ryanjbaxter
Grzegorz Poznachowski
@poznachowski
Nov 16 2017 10:53
I know that Feign clients registration is specific, but I'm not losing hope - maybe I'm doing something wrong.
alohapinilla
@alohapinilla
Nov 16 2017 11:06
Does someone know the right solution to the configuration of kafka? i'm trying to send a json with a value, i receive the value but also this problem:
java.lang.StringIndexOutOfBoundsException: String index out of range: 36 -> which then follows to a HeaderProblem
i've tried many configurations like: spring.cloud.stream.kafka.bndings.<channel>.consumer.header-mode: raw
Marcin Grzejszczak
@marcingrzejszczak
Nov 16 2017 11:09
are you sure you're using the proper kafka and binder versions ?
alohapinilla
@alohapinilla
Nov 16 2017 11:12
i have:
jhipster_server_version=1.1.9
spring_boot_version=1.5.6.RELEASE
spring_cloud_stream_version=Brooklyn.SR3
spring_kafka_version=1.0.5.RELEASE
for the binder, i dont know which version i have
which are the correct versions?
Marcin Grzejszczak
@marcingrzejszczak
Nov 16 2017 11:14
how does you stream kafka binder dep looks like
please read this section of the documentation and try to set things up in a similar manner. THe docs are for Dalston.SR4 Cloud release train
Stream is there in Chelsea.SR2
so I guess just check the docs of the proper release train and ensure that you didn't mess up the dependencies
alohapinilla
@alohapinilla
Nov 16 2017 11:16
cloud:stream:kafka:binder: brokers: localhost
zk-nodes: localhost
i'll give it a check, thanks ;)
alohapinilla
@alohapinilla
Nov 16 2017 11:54
so i finally managed to find the doc for my configuration brooklyn.SR3 and the good configuration was:
spring.cloud.stream.default.consumer.headerMode=raw
Marcin Grzejszczak
@marcingrzejszczak
Nov 16 2017 12:03
:+1:
always read the docs
we put A LOT of effort in the documentation
but if nobody reads it then it goes in vain :P
Tyler Thrailkill
@snowe2010
Nov 16 2017 19:09
is there any way to sink from dynamic rabbitmq queues?
Tyler Thrailkill
@snowe2010
Nov 16 2017 20:13
I've seen BinderAwareChannelResolver, but I want the consumer side, not producer.
Tyler Thrailkill
@snowe2010
Nov 16 2017 20:34
i'm producing from a rabbitmq queue and my app just needs to stream messages to an SseEmitter.
Sabby Anandan
@sabbyanandan
Nov 16 2017 20:53
@snowe2010 Please re-post this question in: https://gitter.im/spring-cloud/spring-cloud-stream
Gary Russell
@garyrussell
Nov 16 2017 21:01
@snowe2010 When reposting over there, please clarify - do you mean create a stream app that will consume from a dynamically created destination (or some arbitrary rabbitmq queue), or do you mean you want to somehow "discover" new queues and add them to an existing consuming application.
Tyler Thrailkill
@snowe2010
Nov 16 2017 21:02
oh I searched for stream and couldn't find it. thanks! I'll do that.