|
|
|
@ -24,6 +24,7 @@ import com.alibaba.cloud.stream.binder.rocketmq.provisioning.RocketMQTopicProvis
|
|
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnabledHealthIndicator;
|
|
|
|
|
import org.springframework.boot.actuate.health.HealthIndicator;
|
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
|
|
|
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
|
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
|
@ -46,13 +47,6 @@ public class RocketMQBinderAutoConfiguration {
|
|
|
|
|
@Autowired
|
|
|
|
|
private RocketMQBinderConfigurationProperties rocketBinderConfigurationProperties;
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
|
@ConditionalOnEnabledHealthIndicator("rocketmq")
|
|
|
|
|
@ConditionalOnClass(name = "org.springframework.boot.actuate.health.HealthIndicator")
|
|
|
|
|
public RocketMQBinderHealthIndicator rocketMQBinderHealthIndicator() {
|
|
|
|
|
return new RocketMQBinderHealthIndicator();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
|
public RocketMQTopicProvisioner rocketMQTopicProvisioner() {
|
|
|
|
|
return new RocketMQTopicProvisioner();
|
|
|
|
@ -65,4 +59,16 @@ public class RocketMQBinderAutoConfiguration {
|
|
|
|
|
extendedBindingProperties, provisioningProvider);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Configuration(proxyBeanMethods = false)
|
|
|
|
|
@ConditionalOnClass(HealthIndicator.class)
|
|
|
|
|
@ConditionalOnEnabledHealthIndicator("rocketmq")
|
|
|
|
|
static class KafkaBinderHealthIndicatorConfiguration {
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
|
public RocketMQBinderHealthIndicator rocketMQBinderHealthIndicator() {
|
|
|
|
|
return new RocketMQBinderHealthIndicator();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|