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:

	@SensiSourceConfigChannelParametersBean
	@Qualifier(SP_QUALIFIER__SBM_DELTA_CHANNEL_PARAMETER)
	@OnInMemoryDatabase
	public ChannelParameters sbmDeltaChannelParameter() {
		return new ChannelParameters(SbmDeltaFileConstants.TOPIC_SENSITIVITIES, TRADE_BASE_STORE, FRTBDataLoadConstants.SB_DELTA_SENSITIVITIES_FILE_PATTERN,
				SbmDeltaFileConstants.ALL_FIELDS, createDeltaCalculators(), this::createSbmDeltaTuplePublisher);
	}

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)
    @OnInMemoryDatabase
	@Primary
	public ChannelParameters customSbmDeltaChannelParameter(ChannelParameters sbmDeltaChannelParameter) {
		// return new custom ChannelParameters object
	}

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:

	@SourceConfigChannelParametersBean
	@Qualifier(SP_QUALIFIER__CUSTOM_CHANNEL_PARAMETER)
	public ChannelParameters customChannelParameter() {
		return new ChannelParameters("custom_store", "custom-topic", "custom.file-pattern" /* ... */);
	}

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
“SeniorityDescription” “seniorityDescriptionChannelParameter” ASourceConfig @OnInMemoryDatabase
“FXRates” “fxStoreChannelParameter” ASourceConfig @OnInMemoryDatabase
“FXHistorical” “fxHistoricalChannelParameter” ASourceConfig @OnInMemoryDatabase
“Scenarios” “scenarioChannelParameter” ASourceConfig
“IMAMultiplier” “imaMultipleChannelParameter” ASourceConfig
“LegalEntityAttributes” “legalEntityAttributesChannelParameter” ASourceConfig @OnInMemoryDatabase
“EquityBuckets” “equityBucketsChannelParameter” ASourceConfig
“CommodityBuckets” “commodityBucketsChannelParameter” ASourceConfig
“DrcSecNonCtpBuckets” “drcSecNonCtpBucketsChannelParameter” ASourceConfig
“EQUITY_BUCKET_DESCRIPTION” “equityBucketsDescriptionChannelParameter” ASourceConfig @OnInMemoryDatabase
“IMARiskFactors” “imaRiskFactorsChannelParameter” ASourceConfig @OnInMemoryDatabase
“IMARiskFactorsHistorical” “imaRiskFactorsHistoricalChannelParameter” ASourceConfig @OnInMemoryDatabase
“PLScenarios” “plScenarioStoreChannelParameter” ASourceConfig
“PLSummaryScenarios” “plSummaryScenarioStoreChannelParameter” ASourceConfig
“DRCScenarios” “drcScenarioChannelParameter” ASourceConfig
“CSR_BUCKET_DESCRIPTION_NONSEC” “csRNSBucketDescriptionChannelParameter” ASourceConfig @OnInMemoryDatabase
“CSR_BUCKET_DESCRIPTION_SECNONCTP” “csrSecNonCtpBucketsDescriptionChannelParameter” ASourceConfig @OnInMemoryDatabase
“CSR_BUCKET_DESCRIPTION_SECCTP” “csrSecCtpBucketDescriptionChannelParameter” ASourceConfig @OnInMemoryDatabase
“StressCalibrationScenarios” “stressCalibrationChannelParameter” ASourceConfig
“FXRates” “fxLocalCloneChannelParameter” ASourceConfig @OnDirectQueryDatabase
“BookParentChild” “bookParentChildChannelParameter” ASourceConfig
“LegalEntityParentChild” “legalEntityParentChildChannelParameter” ASourceConfig
“RiskFactorDescriptionOverrides” “riskFactorDescriptionChannelParameter” ASourceConfig @OnInMemoryDatabase
“UnderlyingDescriptionOverrides” “underlyingDescriptionOverridesChannelParameter” ASourceConfig @OnInMemoryDatabase
“ObligorOverrides” “obligorOverridesChannelParameter” ASourceConfig @OnInMemoryDatabase
“TrancheOverrides” “trancheOverridesChannelParameter” ASourceConfig @OnInMemoryDatabase
“RRAOOverrides” “rraoOverridesChannelParameter” ASourceConfig @OnInMemoryDatabase
“LegalEntityImports” “inMemoryLegalEntityImportsChannelParameter” ASourceConfig @OnInMemoryDatabase
“LegalEntityImports” “onDirectQueryLegalEntityImportsChannelParameter” ASourceConfig @OnDirectQueryDatabase
“PLTrades” “plChannelParameter” ASourceConfig @OnInMemoryDatabase
“PLSummary” “plSummaryChannelParameter” ASourceConfig @OnInMemoryDatabase
“DRC_SCENARIO_COUNT” “drcScenarioCountChannelParameter” ASourceConfig
“Trade_Attributes” “tradeAttributesChannelParameter” ASourceConfig @OnInMemoryDatabase
“DRC” “drcChannelParameter” ASourceConfig @OnInMemoryDatabase
“DRC” “drcTradeChannelParameter” ASourceConfig @OnInMemoryDatabase
“DRC_NONLINEAR_RECOVERY” “drcNonLinearRecoveryChannelParameter” ASourceConfig @OnInMemoryDatabase
“IMA_Trades” “imaTradesChannelParameter” ASourceConfig @OnInMemoryDatabase
“IMA_Summary” “imaSummaryChannelParameter” ASourceConfig @OnInMemoryDatabase
“IMA_DRC_Summary” “imaDrcSummaryChannelParameter” ASourceConfig @OnInMemoryDatabase
“StressCalibration_Trades” “stressCalibrationTradesChannelParameter” ASourceConfig @OnInMemoryDatabase
“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
“SBM_Delta_Sensi” “sbmDeltaChannelParameter” ASensiSourceConfig @OnInMemoryDatabase
“SBM_Vega_Sensi” “sbmVegaChannelParameter” ASensiSourceConfig @OnInMemoryDatabase
“SBM_Curvature_Sensi” “sbmCurvatureChannelParameter” ASensiSourceConfig @OnInMemoryDatabase
“CRIF” “crifChannelParameter” ASensiSourceConfig @OnInMemoryDatabase
“SBM_Update_Optionality” “updateOptionalityChannelParameter” ASensiSourceConfig @OnInMemoryDatabase