diffusion

This section describes the basic details required for connection to the Diffusion server. Most can also be defined using bootstrap configuration.

If Diffusion connection details are provided in both; bootstrap configuration and configuration file, the bootstrap entries override the configuration file entries.

The main items in this section are :

Key Description Default

url

The url of the Diffusion server to connect to.
When Diffusion is operating in a cluster, then any cluster member can be connected to.

n/a

principal

The name of a principal defined within the Diffusion server permissions which has REGISTER_HANDLER permissions, allowing it to register as a gateway application.

n/a

password

The password required to connect with the specified principal.

n/a

reconnectIntervalMs

The interval (in milliseconds) at which the framework must attempt to reconnect to the Diffusion server, if connection is lost.

5000

maximumMessageSize

The maximum size (in bytes) that any message (update to or from Diffusion) can be.
This may be used to limit the maximum size of data being passed.

The maximum size that can be held in a Java Integer.

maximumQueueSize

The maximum size of the outbound message queue for the connection.
The outbound message queue must be large enough to accommodate all the update messages sent to the server.
It may be necessary to increase this value for applications that send messages in bursts, or continue to send messages, when a session is disconnected and reconnecting.
Larger values allow more messages to be queued, and increase the memory footprint of the session.
If the outbound message queue fills, sending a message will cause the session to close with an error.

10000

inputBufferSize

The size of the TCP input buffer (in bytes) used by the connection to receive data from the server.
For details, refer to the Performance Tuning section.

524288 (512KiB)

outputBufferSize

The size of the TCP output buffer (in bytes) used by the connection for sending data to the server.
For details, refer to the Performance Tuning section.

524288 (512KiB)

additionalProperties

A map of user defined properties to be passed to the server.
This should only be used when the Diffusion server requires special properties to be applied when connecting.
For details, refer to the Diffusion Client API documentation.

none

Example: diffusion Section

"diffusion": {
    "url": "ws://localhost:8080",
    "principal": "admin",
    "password": "password",
    "reconnectIntervalMs": 5000
}