spring-cloud

Spring Cloud Streams - Multiple dynamic destinations for sources and sinks

孤人 提交于 2019-12-11 02:08:13
问题 There was a change request on my system, which currently listens to multiple channels and send messages to multiple channels as well, but now the destination names will be in the database and change any time. I'm having trouble believing I'm the first one to come across this, but I see limited information out there. All I found is these 2... Dynamic sink destination: https://github.com/spring-cloud-stream-app-starters/router/tree/master/spring-cloud-starter-stream-sink-router, but how would

How to implement Sleuth Tracing With Feign.Builder?

筅森魡賤 提交于 2019-12-11 01:48:20
问题 I'm trying to integrate Sleuth into our system. If I use interfaces annotated with @FeignClient , everything works fine. These interfaces get instrumented automatically, and Sleuth headers get propagated with REST calls. But, we have some existing code that uses Feign.Builder directly with Feign annotated interfaces (just not annotated with @FeignClient ). This code adds some custom request interceptors, encoder, proxy, etc. For example: // Feign REST interface public interface MyService {

Spring Oauth2 Authentication AWS behind Zuul

我的梦境 提交于 2019-12-11 01:29:57
问题 I have a problem/question. I have a "typical" spring cloud netflix environment at aws running. Now to my problem: Given (working authentication): Request (https: //DOMAIN.net/) -> AWS Load balancer (adds headers X-Forwarded-For and X-Forwarded-Proto) -> Zuul The route / for zuul is secured this means spring security correctly redirects the user to https: //DOMAIN/login and this triggers the correct redirect to our auth server with the correct redirect URI. No problem here. Given (not working

Spring Cloud AWS - Invalid Header posting SNS notification

有些话、适合烂在心里 提交于 2019-12-11 01:25:14
问题 I'm trying to use org.springframework.cloud.aws.messaging.core.NotificationMessagingTemplate (from Spring Cloud AWS) to post notifications to a SNS Topic. Every time a notification is posted a warning message is generated: WARN [org.springframework.cloud.aws.messaging.core.TopicMessageChannel] Message header with name 'id' and type 'java.util.UUID' cannot be sent as message attribute because it is not supported by SNS. The issue seems to be that org.springframework.messaging.MessageHeaders

How to aggregate hystrix metrics with turbine-stream and kafka when using spring cloud?

社会主义新天地 提交于 2019-12-11 01:18:44
问题 When I aggregate hystrix metrics in clusters with turbine when using spring cloud stream and kafka stream. I encountered the following error: 2017-03-07 16:54:57.519 INFO 12808 --- [o-eventloop-3-1] o.s.c.n.t.s.TurbineStreamConfiguration : SSE Request Received 2017-03-07 16:54:57.519 INFO 12808 --- [o-eventloop-3-2] o.s.c.n.t.s.TurbineStreamConfiguration : SSE Request Received 2017-03-07 16:55:04.121 INFO 12808 --- [o-eventloop-3-3] o.s.c.n.t.s.TurbineStreamConfiguration : Unsubscribing

Spring Cloud app doesn't register correct port to Eureka

帅比萌擦擦* 提交于 2019-12-11 01:06:26
问题 I've got a nice set of Spring Cloud -applications running but the actual applications register with wrong port to the DiscoveryServer. I've got a Config-server, Eureka-server and a Zuul-server, which all talk to each other nicely and everything's shiny. Then I added my actual app and everything wasn't shiny no more. My app runs on port 9001 and it works, but somehow it registers with Eureka on port 8080 . I'm totally baffled as to what is going on. gradle file: https://gist.github.com

Spring Boot external configuration order when using Cloud Config Server?

五迷三道 提交于 2019-12-11 00:35:59
问题 I'm starting to use Spring Cloud Config and would like to give a way for clients to override properties that come from cofnig server. However, after reading https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html, it isn't apparent when the Cloud Configuration applies. I've also read http://cloud.spring.io/spring-cloud-config/spring-cloud-config.html and it talks about overrides. But they seem to be the opposite of what I want (those overrides are for

微服务接口的六种设计模式

流过昼夜 提交于 2019-12-10 23:34:26
1.使用RebbitMQ收集数据的原理是什么? 采取第一种方式时, 使用的是Turbine来聚合多种服务 ,然后通过Dashboard图形化管理界面来进行管理 采取第二种方式(RabbitMQ),使用的是RabbitMQ来对服务进行聚合然后将数据传输给Turbine最后发送给Dashboard图形化管理界面来进行管理 2.1创建Consumer服务。 2.2修改POM文件添加相关坐标 。 2.3修改POM文件,添加actuator启动器,添加hystrix启动器、hystrix-dashboard启动器、 hystrix-stream启动器、stream-rabbit启动器。 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.bjsxt</groupId>

My application does not read bootstrap.yml. Why is that?

夙愿已清 提交于 2019-12-10 20:56:41
问题 My bootstrap.yml is loaded before application.yml , but as soon as I remove application.yml , my bootstrap.yml is not being read anymore. If i remove bootstrap.yml and put it into application.yml , the code runs properly and I can also get the name of the application from the RetfulService . DemoNiladriApplication is the code where the Spring boot loads. WelcomeService is where I get the resource from the .yml file. WelcomeController is the rest app which prints out the application name which

Override Spring Cloud Config values with environment

狂风中的少年 提交于 2019-12-10 19:25:43
问题 Is there a way to override properties set via a Spring Cloud Config Server with another property source (specifically, the system environment)? I know I could manually do it by looping through the Environment object's PropertySource s, but if I could set it up so that the bootstrapConfig source was lowest priority, that would be ideal. 回答1: FWIW, I accomplished this by writing a custom ApplicationListener whose Event fired early in the cycle, but after the Config Service's PropertySource was