Comments (6)
You are right, there's a bug in the method rsocketBrokerHealth of class com.alibaba.spring.boot.rsocket.RSocketAutoConfiguration.
CODE:
@Bean
@ConditionalOnProperty("rsocket.brokers")
public RSocketBrokerHealthIndicator rsocketBrokerHealth(
RSocketEndpoint rsocketEndpoint,
UpstreamManager upstreamManager,
@Value("${rsocket.brokers}") String brokers
) {
return new RSocketBrokerHealthIndicator(rsocketEndpoint, upstreamManager, brokers);
}
from alibaba-rsocket-broker.
rsocket.broker.topology=gossip
rsocket.broker.seeds=192.168.1.2,192.168.1.3,192.168.1.4
from alibaba-rsocket-broker.
rsocket.broker.topology=gossip
rsocket.broker.seeds=192.168.1.2,192.168.1.3,192.168.1.4
The above properties are used by the alibaba-rsocket-server
. This issue occurs in alibaba-rsocket-spring-boot-starter.
.
@Bean
@ConditionalOnProperty("rsocket.brokers")
public RSocketBrokerHealthIndicator rsocketBrokerHealth(RSocketEndpoint rsocketEndpoint, UpstreamManager upstreamManager, @Value("${rsocket.brokers}") String brokers) {
return new RSocketBrokerHealthIndicator(rsocketEndpoint, upstreamManager, brokers);
}
If you use application.properties
or application.yaml
+ string, the RSocketBrokerHealthIndicator
will be registered without any problems.
rsocket.brokers=tcp://localhost:9999
rsocket:
brokers: tcp://localhost:9999
However, if you use an array of strings, it won't register.
rsocket:
brokers:
- tcp://localhost:9999
This is fine for practical use, but kubernetes scheduler can't perform health checks properly because the health indicator is not registered.
from alibaba-rsocket-broker.
Sorry for last reply. But it works for me.
Envirements:
- SpringBoot 3.1.4
- Alibaba RSocket Broker version: 1.1.5
- Operating System version: Mac
- Java version: 17
Code:
rsocket:
brokers:
- tcp://127.0.0.1:9999
- tcp://127.0.0.1:9999
jwt-token: None
from alibaba-rsocket-broker.
Array indentation should be 2 space in your yaml file.
from alibaba-rsocket-broker.
I've been using alibaba-rsocket-broker
in production for over a year. I'm not talking about the rsocket app not working, I'm talking about the health indicator not registering.
In the yaml, if rsocket.brokers is a list, then RSocketBrokerHealthIndicator is not registered.
- use string
rsocket:
brokers: tcp://127.0.0.1:9999
jwt-token: None
management:
endpoint:
health:
show-details: always
curl http://localhost:8080/actuator/health/rsocketBrokerHealth
{"status":"UP","details":{"brokers":"tcp://127.0.0.1:9999","localServiceStatus":"Serving"}}
- use array
rsocket:
brokers:
- tcp://127.0.0.1:9999
jwt-token: None
management:
endpoint:
health:
show-details: always
curl http://localhost:8080/actuator/health/rsocketBrokerHealth
-->
from alibaba-rsocket-broker.
Related Issues (20)
- java 17 支持 HOT 9
- 我在尝试使用SpringBoot3.0构建NativeImages,但是无法正确获取到反射的类 HOT 7
- 关于项目不温不火的疑惑
- 启动一会用了一段时间后日志报错,web接口调用也失败 HOT 1
- Dependency org.yaml:snakeyaml, leading to CVE problem
- Upgrade RSocket Broker to Java 17 HOT 1
- 使用 p2p-service,必须在 application.properties,同时通过 rsocket.routes[0] 指定 provider 才生效 HOT 1
- broker 拒绝 accept 连接时,是否未关闭 requesterSocket HOT 1
- 编译报错mvn -DskipTests clean package HOT 3
- 会有 dubbo-gateway 功能模块吗?
- 服务注册异常 HOT 3
- 通过 RSocketConfigPropertySourceLocator 获取的配置信息字符串,一头一尾各多一个双引号 HOT 1
- 在 wiki 文章《RSocket二进制和流式数据支持: RSocket Binary》中的一些疑问 HOT 1
- springBoot由2.3.4升级到2.7.10后rsocket不兼容 HOT 1
- 怎么在requester中动态添加属性或者标签,在RSocketFilter中根据属性来动态分发路由
- 想问下关于RSocket的发展 HOT 3
- 现在能作为api网关直接用nginx 访问broker请求业务吗 HOT 3
- 服务在线约3分钟后,appNotificationProcessor 会发射离线信号?
- 希望在发版时 能提供对应的 jar 包,下载后在编译太麻烦了,很多依赖需要下载,好长时间的啊
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alibaba-rsocket-broker.