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.
C-based DataSource applications
Java-based DataSource applications (from version 6.2 onwards)
add-pattern <incoming-pattern> <outgoing-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
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.
add-pattern /FX/E*R /FXPRICE/E*Risn't valid.