class StreamsMessagingManagerServiceConfigProvider extends AbstractRdsRoleConfigProvider {

    @Override
    public List<ApiClusterTemplateConfig> getServiceConfigs(CmTemplateProcessor templateProcessor, TemplatePreparationObject source) {
        final List<ApiClusterTemplateConfig> configList;
        String cdhVersion = source.getBlueprintView().getProcessor().getStackVersion() == null ?
                "" : source.getBlueprintView().getProcessor().getStackVersion();
        if (isVersionNewerOrEqualThanLimited(cdhVersion, CLOUDERAMANAGER_VERSION_7_2_0)) {
            RdsView smmRdsView = getRdsView(source);
            configList = List.of(
                    config(DATABASE_TYPE, dataBaseTypeForCM(smmRdsView.getDatabaseVendor())),
                    config(DATABASE_NAME, smmRdsView.getDatabaseName()),
                    config(DATABASE_HOST, smmRdsView.getHost()),
                    config(DATABASE_PORT, smmRdsView.getPort()),
                    config(DATABASE_USER, smmRdsView.getConnectionUserName()),
                    config(DATABASE_PASSWORD, smmRdsView.getConnectionPassword())
            );
        } else {
            String cmHost = source.getGeneralClusterConfigs().getPrimaryGatewayInstanceDiscoveryFQDN()
                    .orElse(source.getGeneralClusterConfigs().getClusterManagerIp());

            boolean ssl = source.getGeneralClusterConfigs().getAutoTlsEnabled();
            configList = Lists.newArrayList(
                    config("cm.metrics.host", cmHost),
                    config("cm.metrics.username", source.getGeneralClusterConfigs().getCloudbreakAmbariUser()),
                    config("cm.metrics.password", source.getGeneralClusterConfigs().getCloudbreakAmbariPassword()),
                    config("cm.metrics.protocol", ssl ? "https" : "http"),
                    config("cm.metrics.port", ssl ? "7183" : "7180")
            );
        }
        return configList;
    }

}