@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    @Bean
    public RegisteredServiceReplicationStrategy registeredServiceReplicationStrategy(
        final ConfigurableApplicationContext applicationContext,
        final CasConfigurationProperties casProperties,
        @Qualifier("registeredServiceDistributedCacheManager")
        final DistributedCacheManager<RegisteredService, DistributedCacheObject<RegisteredService>, PublisherIdentifier> registeredServiceDistributedCacheManager,
        @Qualifier("casRegisteredServiceStreamPublisherIdentifier")
        final PublisherIdentifier casRegisteredServiceStreamPublisherIdentifier) {
        return BeanSupplier.of(RegisteredServiceReplicationStrategy.class)
            .when(CONDITION.given(applicationContext.getEnvironment()))
            .supply(() -> {
                val stream = casProperties.getServiceRegistry().getStream();
                return new DefaultRegisteredServiceReplicationStrategy(registeredServiceDistributedCacheManager,
                    stream, casRegisteredServiceStreamPublisherIdentifier);
            })
            .otherwiseProxy()
            .get();
    }
This is {@link CasServicesStreamingAutoConfiguration}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-service-registry-stream/src/main/java/org/apereo/cas/config/CasServicesStreamingAutoConfiguration.java