DataSource peers configuration (part 1)
These DataSource configuration items define a DataSource application’s connections to its DataSource peers.
"this DataSource application" means the DataSource application for which you are defining the configuration. "DataSource peer" or "peer" means a DataSource application that this DataSource application communicates with. |
For more DataSource-peer configuration items, see DataSource peers configuration (part 2).
add-peer
add-peer
specifies a DataSource peer that this DataSource application can connect to. You can have a maximum of 1023 add-peer
entries in your configuration.
Use in: C, Java
Syntax:
add-peer local-label [string] addr [array of strings] port [array of strings] connect-timeout [integer] heartbeat-slack-time [float] heartbeat-time [integer] label [string] local-flags [integer/string] local-handshake-data [array of strings] local-id [integer] local-label [string] local-name [string] local-type [integer/string] monitor-interval [float] queue-size [integer] remote-flags [integer/string] remote-id [integer] remote-label [string] remote-name [string] remote-type [integer/string] request-timeout [float] ssl [boolean] ssl-accept-certificate [string] ssl-cipherlist [string] ssl-passwordfile [string] ssl-present-certificate [string] ssl-privatekey [string] ssl-verify-mode [string] thread-name [string] end-peer
Option | Type | Default | Description | ||||
---|---|---|---|---|---|---|---|
array of strings |
|
A space-separated list of peer addresses to connect to. Only include the If more than one address is provided, the additional addresses are used for failover in the situation where the connection to the first address fails. If this DataSource application can’t connect to any of the addresses in the list, but it’s trying to establish a connection for a data service, the application will try to fail over at the data service level (through multiple add-priority options within an add-source-group option of add-data-service). |
|||||
integer |
|
When this DataSource application requests to connect to a DataSource peer that either doesn’t exist or to which there is currently no network route, the operating system will attempt to connect for a time that’s dependent on various tunable operating system parameters - typically up to 4 minutes. For the purposes of obtaining real-time data this timeout is too long; |
|||||
float |
|
When this DataSource application doesn’t receive an expected DataSource heartbeat from the peer, it waits The minimum allowed value is Unlike For an explanation of heartbeats, see heartbeat-time. |
|||||
integer |
[disabled] |
The two peers involved in a DataSource connection exchange heartbeat messages at regular intervals so that each of the DataSource applications can check that the other is still present, and take appropriate action if it is not (such as attempt to reconnect to the peer, or fail over to another peer).
The minimum allowed value is If you don’t configure a Also see heartbeat-slack-time, and How can I… Enable heartbeats between DataSource applications. |
|||||
string |
[none] |
Deprecated. Use remote-label instead. A label that uniquely defines (within the Caplin Platform installation) the DataSource peer. This option is used in the add-data-service configuration item to refer to the peer connection over which data for the data service is to be obtained. Its value must match that of the datasrc-local-label configuration item in the peer’s configuration, or it must match a local-label option in an Also see Note 1.
|
|||||
integer/ string |
|
Specifies flags determining the behaviour of this DataSource application when it starts up and establishes the connection to the peer, or when it reconnects to the peer. Possible values are:
See also: remote-flags |
|||||
array of strings |
[Basic handshake data provided by the DataSource library - see Description] |
A space-separated list of strings that are appended to the list of handshake data sent in the initial DataSource PEERINFO exchange with the DataSource peer defined by this This option is only available in the following API versions:
The purpose of the handshake data is to provide version and configuration information to this DataSource application’s peer. Basic handshake data is automatically appended to the PEERINFO message by the DataSource library that this application is using. This data consists of: technology=<DataSource-implementation-type>, datasrc-version=<DataSource-version-number>, hostname=<hostname>, platform=<platform-type> For example, here’s some handshake data created by a DataSource application implemented using the DataSource Java library: technology=DSSJ, datasrc-version=6.2.5-dev, hostname=localhost, platform=x86-win32 Platform components, such as Liberator and Transformer, that are built using DataSource libraries, append their own configuration and version information to the handshake data. You can use the PEERINFO messages are logged in the DataSource application’s event log and are also broadcast to JMX listeners (see DataSource monitoring and management). |
|||||
integer |
Value of datasrc-id |
Deprecated. Use local-label instead. An ID that uniquely defines this DataSource application within the Caplin Platform installation for the purposes of the connection to the peer defined by this You can use |
|||||
string |
Value of datasrc-local-label |
A label that uniquely defines this DataSource application within the Caplin Platform installation for the purposes of the connection to the peer defined by this You can use You should use this option, in conjunction with remote-label, rather than the local-id option. (But, if you don’t specify a Also see Note 1 and the example below. |
|||||
string |
Value of datasrc-name |
The name of this DataSource application by which the DataSource peer defined by this The name can contain the parameters At run time, |
|||||
integer/ string |
|
Specifies flags determining the type of this DataSource application as far as the peer is concerned. This information is sent to the peer when this DataSource application connects to the peer, and it overrides any remote-type option in the peer’s configuration for the connection. Possible values are:
The flags can be ORed together using the ‘ Also see remote-type. |
|||||
float |
Value of |
The interval in seconds at which statistics about this DataSource application’s connection to the peer are read and transferred to the application’s JMX monitoring module.
|
|||||
array of integers |
[none] |
A space-separated list of ports to connect to. The number of ports in the list must be the same as the number of addresses in the addr option. Only include the If more than one port is provided the additional ports are used for failover in the situation where the connection to the first first address fails - see the explanation in the addr option. |
|||||
integer |
|
The maximum size of the queue to hold messages arriving from the peer. |
|||||
integer/ string |
|
Specifies flags determining the behaviour of the peer when it starts up and establishes the connection to this DataSource application, or when it reconnects to this DataSource application. The values set by this option are overridden by the local-flags setting of the peer’s configuration when the peer connection is made. Possible values are:
|
|||||
integer |
|
Deprecated. Use remote-label instead. An ID that uniquely defines (within the Caplin Platform installation) the DataSource peer. This ID must match the value of datasrc-id defined in the peer’s configuration (or the value of a local-id option in the peer’s |
|||||
string |
[none] |
A label that uniquely defines (within the Caplin Platform installation) the DataSource peer. You should use this option, rather than the remote-id option. Its value must match that of the datasrc-local-label configuration item in the peer’s configuration, or it must match a local-label option in an
Also see Note 1 and the example below. |
|||||
string |
(see Description) |
The name of the DataSource peer. At run-time this name is replaced with the name defined in the peer’s configuration (through datasrc-name or the local-name option of an The default value is |
|||||
integer/ string |
0 (= |
Specifies flags determining the type of the peer. The values set by this option are overridden by the local-type setting of the peer’s configuration when the peer connection is made. Possible values are:
The flags can be ORed together using the ‘ Also see Note 2. |
|||||
float |
Value of |
The time in seconds for which this DataSource application waits for the peer to answer a request. It overrides the global request timeout item source-request-timeout and is in turn overridden by the add-data-service timeout option, request-timeout.
|
|||||
boolean |
|
When
In Java-based DataSource applications, you must explicitly set the option to Correct: add-peer ssl TRUE ... end-peer Wrong: add-peer ssl ... end-peer In C-based DataSource applications:
In Java-based DataSource applications, the certificate and private key are held in the Java KeyStore (see datasrc-ssl-keystore). |
|||||
string |
[none] |
When an SSL connection is being established with a peer, this option is used for certificate pinning: the DataSource application compares the public key in the certificate received from the peer against the public key specified by (For more about certificate pinning, see the Wikipedia article at https://en.wikipedia.org/wiki/Certificate_pinning#Certificate_pinning.)
If you’ve set the ssl option to |
|||||
string |
Value of datasrc-ssl-cipherlist |
A colon separated list of SSL ciphers that the peer connection will use. For this peer connection, See datasrc-ssl-cipherlist for more information about SSL ciphers and links to the lists of valid ciphers. |
|||||
string |
[none] (= no password needed) |
The path to, and filename of, a password file that contains a plain text (unencrypted) password used to access private key files and certificate files.
In a C-based DataSource application, the password provides access to the password-protected private key file defined by the ssl-privatekey option and access to the certificate file (ssl-present-certificate) that’s paired with this private key.
|
|||||
string |
[none] |
Specifies the SSL certificate file that this DataSource application sends to the peer when initiating an SSL connection with it. This is the certificate that identifies this DataSource application to the peer.
Specify this option when the ssl option is set to When this DataSource application acts as an SSL server (that is, it accepts incoming SSL connections from peers), the certificate that it sends to the connecting peer is the one defined by datasrc-ssl-certificate. |
|||||
string |
[none] |
Specifies the path to, and filename of, the SSL private key associated with the certificate specified by ssl-present-certificate. This DataSource application uses the key to decrypt the symmetric session key received from the peer. The private key file must be in PEM format. Specify this option when the ssl option is set to The directory path can contain the parameters When this DataSource application acts as an SSL server (that is, it accepts incoming SSL connections from peers), the private key that it uses is the one defined by datasrc-ssl-privatekey.
|
|||||
string |
|
Specifies how this SSL connection behaves during the SSL handshake. Values accepted are:
The meanings of these settings are given in the NOTES section of the OpenSSL 1.0.2 documentation for You can combine values together using the
|
|||||
string |
An empty string |
Defines a named thread on which communications with the peer are processed. If the same thread name is defined for more than one DataSource peer, all these peers share this same thread. If this option is not defined, or is an empty string, but the global configuration option peer-thread-pool-size is more than zero, a thread from the global pool of peer connection threads is allocated to the peer. If neither
For more about using
|
Notes:
-
Platform blades, and Liberator and Transformer that run under version the Caplin Platform Deployment Framework use the deprecated label option in their configuration, rather than remote-label. This will change in a future release of the Framework.
-
The setting of the remote-type option can appear in log files and is available to monitoring utilities. In addition, if a client application requests data that’s provided by a DataSource peer of this type, but the remote DataSource peer has not yet connected to the Liberator, Liberator uses this information to inform the client application that the service is not available because the DataSource peer is down.
Example of datasrc-local-label and remote-label
This example shows how the datasrc-local-label configuration item and the remote-label option of add-peer are used to define the connections between DataSource applications.
Assume you have two DataSource applications, one is a Liberator called MyLiberator and the other is an Integration Adapter called MyIntegrationAdapter. The following configurations allow MyIntegrationAdapter to connect to MyLiberator. There’s also a data service defined for MyLiberator (using add-data-service) that enables the Liberator to subscribe to FX prices supplied by MyIntegrationAdapter.
datasrc-name MyIntegrationAdapter-%h datasrc-local-label MyIntegrationAdapter add-peer remote-name MyLiberator remote-label MyLiberator addr <MyLiberators-hostname> port <MyLiberators-portnumber> end-peer
datasrc-name MyLiberator-%h datasrc-local-label MyLiberator add-peer remote-name MyIntegrationAdapter remote-label MyIntegrationAdapter end-peer add-data-service service-name fx-prices include-pattern ^/FX/ add-source-group required TRUE retry-time 20 add-priority remote-label MyIntegrationAdapter end-priority end-source-group end-data-service
See also:
-
Reference: DataSource peers configuration (part 2)
-
Reference: Data services configuration
-
Reference: DataSource Secure Sockets Layer (SSL) configuration
-
How can I… Use timers in DataSource applications
-
How can I… Enable heartbeats between DataSource applications
-
How can I… Configure threads for peer communication
-
How can I… Set up secure connections between DataSource applications