Ensuring a proper startup of the JavaScript joynr runtime, some settings are required.
The following describes which settings can be changed in the UdsLibJoynrRuntime by providing
a settings object (udsLibJoynrProvisioning
) to the constructor of the runtime.
All settings are optional.
var udsLibJoynrProvisioning = {
uds: udsValue, // optional, see below
capabilities: capabilitiesValue, // optional, see common settings
discoveryQos: discoveryQosValue, // optional, see common settings
logging: loggingValue, // optional, see common settings
messaging: messagingValue, // optional, see common settings
persistency: persistencyValue, // optional, see common settings
shutdownSettings: shutdownSettingsValue, // optional, see common settings
};
var udsValue = {
// optional, default value is: "/var/run/joynr/cluster-controller.sock"
socketPath: <socketPath>,
// optional, uuid value will be auto generated by default
clientId: <clientId>,
// optional, default value is 500
connectSleepTimeMs: <time in milliseconds between uds reconnect attempts>
}
}
The following describes which settings can be changed in the WebSocketLibjoynrRuntime by providing
a settings object (websocketLibJoynrProvisioning
) to the constructor of the runtime.
Most settings are optional.
var websocketLibJoynrProvisioning = {
ccAddress: ccAddressValue, // MANDATORY, see below
websocket: { // optional
// default value is 1000
reconnectSleepTimeMs : <time in milliseconds between websocket reconnect attempts>
}
capabilities: capabilitiesValue, // optional, see common settings
discoveryQos: discoveryQosValue, // optional, see common settings
logging: loggingValue, // optional, see common settings
messaging: messagingValue, // optional, see common settings
persistency: persistencyValue, // optional, see common settings
shutdownSettings: shutdownSettingsValue, // optional, see common settings
};
var ccAddressValue = {
// the address, how the cluster controller can be reached.
protocol: <protocol>, //optional, default value is "ws"
host: <host>, // MANDATORY
port: <port>, // MANDATORY
path: <path> //optional, default value is ""
};
The following describes the common parts of UdsLibJoynrRuntime Settings and WebSocketLibjoynrRuntime Settings
var capabilitiesValue = [ // untyped list of provisioned capabilities
{
domain: <domain>,
interfaceName: <fully/qualified/interface/name>,
providerQos: {
customParameters: [
{
name: <name>,
value: <value>
},
...
],
scope: <ProviderScope.GLOBAL|ProviderScope.LOCAL>,
priority: <priority>,
supportsOnChangeSubscriptions: <true|false>
},
providerVersion: <provider version>,
participantId: <participantId>
},
...
];
var discoveryQosValue = {
discoveryTimeoutMs: <number>
discoveryRetryDelayMs: <number>
discoveryExpiryIntervalMs: <number> // discoveryExpiryIntervalMs + Date.now() = expiryDateMs
};
var loggingValue = {
configuration: {...} /*
* log4j2-style JSON config, but as JavaScript object
* See https://logging.apache.org/log4j/2.x/manual/configuration.html#JSON
* for more information.
* Since replacing log4javascript due to performance issues,
* not all configuration options are still supported.
* - only one appender is supported. Others will be ignored.
* - reduced complexity of supported patternLayouts.
*/
};
var messagingValue = {
maxQueueSizeInKBytes: <max queue size in KB bytes> // default value is 10000
};
var persistencyValue = {
clearPersistency: <true|false>, // clear persistent data during startup. Default value is false
location: /path/to/localStorage, // Optional. Only implemented for Node. Default is current dir
routingTable: <true|false>, /* Optional. Default false. Persists RoutingTable entries and thus
* allows the runtime to restart without help from the cc.
*/
capabilities: <true|false>, /* Optional. Default true. Persists ParticipantIds of registered
* providers and thus keeps them upon restart.
*/
publications: <true|false>, /* Optional. Default true. Persists previously received
* SubscriptionRequests and thus allows publications to resume
* successfully upon restart.
*/
};
var shutdownSettingsValue = {
clearSubscriptionsEnabled: <true|false>, // default true
clearSubscriptionsTimeoutMs: <number> // default 1000
};