Replacing ChannelParameters Spring beans

The ChannelParameters objects are used to describe and construct the message channels. The ChannelParameters contain information about the source file names, file formats, and how they are processed when loading into the datastore.

The ChannelParameters objects are defined as Spring beans and can be customized by adding new beans. These new beans can either create new ChannelParameters or replace existing ones.

The beans are identified by one of three annotations depending on which source they belong to:

Configuration Class Annotation
ASourceConfig @SourceConfigChannelParametersBean
AConfigurationSourceConfig @ConfigurationSourceConfigChannelParametersBean
ASensiSourceConfig @SensiSourceConfigChannelParametersBean

For example the “sbmDeltaChannelParameter” bean is defined using:

	@Autowired
	ASensiSourceConfig sensiSourceConfig;

	@SensiSourceConfigChannelParametersBean
    @Qualifier(SP_QUALIFIER__SBM_DELTA_CHANNEL_PARAMETER)
    @ConditionalOnInMemoryDatabase
    public ACSVSourceConfig.ChannelParameters sbmDeltaChannelParameter() {
		return sensiSourceConfig.channelParametersBuilder(SbmDeltaFileConstants.TOPIC_SENSITIVITIES, SADatastoreConfig.SA_SENSITIVITIES_STORE_NAME, FRTBDataLoadConstants.SB_DELTA_SENSITIVITIES_FILE_PATTERN)
		.fileColumns(SbmDeltaFileConstants.ALL_FIELDS)
		.calculators(sensiSourceConfig.createDeltaCalculators())
		.tuplePublisherFactory(sensiSourceConfig::createSbmDeltaTuplePublisher).build();
	}

Replacing existing ChannelParameters beans

To replace an existing ChannelParameters bean, a new bean is created with the same qualifier. The @Primary annotation will ensure that the new bean is created instead of the old one.

It is often useful to use the old ChannelParameters’ fields to fill fields which are unchanged by passing the old bean as a parameter of our new ChannelParameter.

For example, to replace the “sbmDeltaChannelParameter” bean above:

    @SensiSourceConfigChannelParametersBean
    @Qualifier(SP_QUALIFIER__SBM_DELTA_CHANNEL_PARAMETER)
    @ConditionalOnInMemoryDatabase
    @Primary
    public ACSVSourceConfig.ChannelParameters customSbmDeltaChannelParameter(ACSVSourceConfig.ChannelParameters sbmDeltaChannelParameter) {
    	return sbmDeltaChannelParameter.toBuilder()
        /* ... */
        .build();
    }

With the existence of this bean, the original bean (sbmDeltaChannelParameter) will not be created.

Creating new ChannelParameters beans

New ChannelParameters can be created and will be picked up automatically. Like the beans defined in ASourceConfig, ASensiSourceConfig, and AConfigurationSourceConfig, these beans should use one of the three annotations above and also provide a qualifier. For example, to load a custom file into a custom store:

	@Autowired
	ASourceConfig sourceConfig;

	@SourceConfigChannelParametersBean
	@Qualifier(SP_QUALIFIER__CUSTOM_STORE_CHANNEL_PARAMETER)
	public ACSVSourceConfig.ChannelParameters customStoreChannelParameter() {
		return sourceConfig.channelParametersBuilder("custom-topic", "custom_store", "custom.file-pattern")
        /* ... */
        .build();
	}

ChannelParameters fields

The ChannelParameters beans contain the following fields:

Field Description Mandatory
storeName Store that will be loaded true
topic Topic name true
filePatternTopicProp File pattern property true
fileColumns The list of columns in the file
riskClass Risk class
fileScanParameters File scan parameter
calculators List of column calculators
tuplePublisherFactory Tuple publisher in form of a function
accumulate Set to true to accumulate all tuples before publishing
fileSeparator File separator

Available ChannelParameters Qualifiers

Below are all the qualifiers of existing ChannelParameters beans.

Topic Name Qualifier Configuration Class Conditional
“FXRates” “fxStoreChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“FXHistorical” “fxHistoricalChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“Scenarios” “scenarioChannelParameter” ASourceConfig
“LegalEntityAttributes” “legalEntityAttributesChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“EquityBuckets” “equityBucketsChannelParameter” ASourceConfig
“CommodityBuckets” “commodityBucketsChannelParameter” ASourceConfig
“DrcSecNonCtpBuckets” “drcSecNonCtpBucketsChannelParameter” ASourceConfig
“EQUITY_BUCKET_DESCRIPTION” “equityBucketsDescriptionChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“IMARiskFactors” “imaRiskFactorsChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“IMARiskFactorsHistorical” “imaRiskFactorsHistoricalChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“PLScenarios” “plScenarioStoreChannelParameter” ASourceConfig
“PLSummaryScenarios” “plSummaryScenarioStoreChannelParameter” ASourceConfig
“DRCScenarios” “drcScenarioChannelParameter” ASourceConfig
“CSR_BUCKET_DESCRIPTION_NONSEC” “csRNSBucketDescriptionChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“CSR_BUCKET_DESCRIPTION_SECNONCTP” “csrSecNonCtpBucketsDescriptionChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“CSR_BUCKET_DESCRIPTION_SECCTP” “csrSecCtpBucketDescriptionChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“StressCalibrationScenarios” “stressCalibrationChannelParameter” ASourceConfig
“FXRates” “fxLocalCloneChannelParameter” ASourceConfig @ConditionalOnDirectQueryDatabase
“BookParentChild” “bookParentChildChannelParameter” ASourceConfig
“LegalEntityParentChild” “legalEntityParentChildChannelParameter” ASourceConfig
“RiskFactorDescriptionOverrides” “riskFactorDescriptionChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“UnderlyingDescriptionOverrides” “underlyingDescriptionOverridesChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“ObligorOverrides” “obligorOverridesChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“TrancheOverrides” “trancheOverridesChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“RRAOOverrides” “rraoOverridesChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“LegalEntityImports” “inMemoryLegalEntityImportsChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“LegalEntityImports” “onDirectQueryLegalEntityImportsChannelParameter” ASourceConfig @ConditionalOnDirectQueryDatabase
“PLTrades” “plChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“PLSummary” “plSummaryChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“DRC_SCENARIO_COUNT” “drcScenarioCountChannelParameter” ASourceConfig
“Trade_Attributes” “tradeAttributesChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“DRC” “drcChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“DRC” “drcTradeChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“DRC_NONLINEAR_RECOVERY” “drcNonLinearRecoveryChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“IMA_Trades” “imaTradesChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“IMA_Summary” “imaSummaryChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“IMA_DRC_Summary” “imaDrcSummaryChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“StressCalibration_Trades” “stressCalibrationTradesChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“EsScenarioFxRates” “esScenariofxStoreChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“EsScenarioFxHistorical” “esScenariofxHistoricalChannelParameter” ASourceConfig @ConditionalOnInMemoryDatabase
“EsScenarioFxRates” “esScenarioFxLocalCloneChannelParameter” ASourceConfig @ConditionalOnDirectQueryDatabase
“SeniorityDescription” “seniorityDescriptionChannelParameter” AConfigurationSourceConfig @ConditionalOnInMemoryDatabase
“CommodityBucketRiskWeights” “commodityBucketsRiskWeightChannelParameter” AConfigurationSourceConfig
“CommodityIntraBucketCorrelations” “commodityIntraBucketCorrelationsChannelParameter” AConfigurationSourceConfig
“DRCWeight” “drcWeightChannelParameter” AConfigurationSourceConfig
“EquityBucketsRiskWeight” “equityBucketsRiskWeightChannelParameter” AConfigurationSourceConfig
“ERBARiskWeight” “erbaRiskWeightChannelParameter” AConfigurationSourceConfig
“FRTBParameters” “frtbParametersChannelParameter” AConfigurationSourceConfig
“Calendar” “calendarChannelParameter” AConfigurationSourceConfig
“FXDeltaSpecialCrosses” “fxDeltaSpecialCrossesChannelParameter” AConfigurationSourceConfig
“GIRRDeltaWeighting” “girrDeltaWeightingChannelParameter” AConfigurationSourceConfig
“GIRRMajorCurrency” “girrMajorCurrencyChannelParameter” AConfigurationSourceConfig
“InstrumentToLGD” “instrumentToLgdChannelParameter” AConfigurationSourceConfig
“LiquidityHorizons” “liquidityHorizonsChannelParameter” AConfigurationSourceConfig
“ObligorToRiskWeight” “obligorToRiskWeightChannelParameter” AConfigurationSourceConfig
“OptionResidualMaturityVertices” “optionResidualMaturityVerticesChannelParameter” AConfigurationSourceConfig
“ParameterSet” “parameterSetChannelParameter” AConfigurationSourceConfig
“VegaRiskWeights” “vegaLiquidityHorizonsChannelParameter” AConfigurationSourceConfig
“Vertices” “verticesChannelParameter” AConfigurationSourceConfig
“FXRiskWeightOverrides” “fxRiskWeightOverridesChannelParameter” AConfigurationSourceConfig
“GIRRCorrelationOverrides” “girrCorrelationOverridesChannelParameter” AConfigurationSourceConfig
“SensitivityScaling” “sensitivityScalingChannelParameter” AConfigurationSourceConfig
“CSR_BUCKET_NONSEC” “csrNsBucketsChannelParameter” AConfigurationSourceConfig
“CSR_BUCKET_SECNONCTP” “csrSecNonCtpBucketsChannelParameter” AConfigurationSourceConfig
“CSR_BUCKET_SECCTP” “csrSecCtpBucketsChannelParameter” AConfigurationSourceConfig
“CSR_BUCKET_RISK_WEIGHTS_NONSEC” “csrNsBucketsRiskWeightChannelParameter” AConfigurationSourceConfig
“CSR_BUCKET_RISK_WEIGHTS_SECNONCTP” “csrSecNonCtpBucketsRiskWeightChannelParameter” AConfigurationSourceConfig
“CSR_BUCKET_RISK_WEIGHTS_SECCTP” “csrSecCtpBucketsRiskWeightChannelParameter” AConfigurationSourceConfig
“CSR_Bucket_Correlations_NONSEC” “csrNsBucketsCorrelationsChannelParameter” AConfigurationSourceConfig
“CSRNonSecHighRatings” “csrNonSecHighRatingsChannelParameter” AConfigurationSourceConfig
“IMAMultiplier” “imaMultipleChannelParameter” AConfigurationSourceConfig
“SBM_Delta_Sensi” “sbmDeltaChannelParameter” ASensiSourceConfig @ConditionalOnInMemoryDatabase
“SBM_Delta_Sensi_Summary” “summarySbmDeltaChannelParameter” ASensiSourceConfig @OnInMemoryDatabase
“SBM_Vega_Sensi” “sbmVegaChannelParameter” ASensiSourceConfig @ConditionalOnInMemoryDatabase
“SBM_Vega_Sensi_Summary” “summarySbmVegaChannelParameter” ASensiSourceConfig @OnInMemoryDatabase
“SBM_Curvature_Sensi” “sbmCurvatureChannelParameter” ASensiSourceConfig @OnInMemoryDatabase
“SBM_Curvature_Sensi_Summary” “summarySbmCurvatureChannelParameter” ASensiSourceConfig @ConditionalOnInMemoryDatabase
“CRIF” “crifChannelParameter” ASensiSourceConfig @ConditionalOnInMemoryDatabase
“SBM_Update_Optionality” “updateOptionalityChannelParameter” ASensiSourceConfig @ConditionalOnInMemoryDatabase