Name mapping configuration
This DataSource configuration item defines how a DataSource application can map namespaces
add-pattern specifies a pattern that maps the namespace of subscription request subjects received by the DataSource application to a different namespace, typically for onward transmission. For example, an Integration Adapter receiving requests for subjects of the form
/FX/<currency-pair> forward these requests to an external pricing system. The pricing system expects the subjects it receives to have the form
/FXPRICE/<currency-pair>; you can use
add-pattern to map such subjects from the one format to the other, as shown in the first example below.
Use in: C, Java
add-pattern <backend-pattern> <caplin-platform-pattern>
Type: array of strings
Default value: [none]
add-pattern /FXPRICE/* /FX/*
* is a wildcard character that means match zero or more characters.
Assume the Integration Adapter referred to above receives a subscription request for the subject
FX/EURUSD. The subject matches the right hand pattern
/FX/* (because the string
EURUSD matches the
* in the pattern). The Integration Adapter therefore changes the subject according to the left hand pattern
/FXPRICE/EURUSD It then sends a request for
/FXPRICE/EURUSD to the external pricing system.
You can only put the * wildcard at the beginning or end of a pattern string. For example,