Just a second...

Configuring fan-out

Configure the the Diffusion™ server to act as a client to one or more other Diffusion servers and replicate topics from those servers.

Use the fanout section of the Server.xml configuration files to define client connections for this secondary server to make to one or more primary servers and the topics on those primary servers to replicate locally.

Each fanout-connection element represents a client connection that your Diffusion server makes to another Diffusion server in your solution.
<fanout>
    <connection>
        <url>ws://primary_server_hostname:8080</url>
        <principal>client</principal>
        <password>password</password>
        <retry-delay>1000</retry-delay>
        <reconnect-timeout>60s</reconnect-timeout>
        <recovery-buffer-size>1024</recovery-buffer-size>
        <input-buffer-size>1024k</input-buffer-size>
        <output-buffer-size>1024k</output-buffer-size>
        <link><selector>?topic_path//</selector></link>
    </connection>
</fanout>

Connection

Use the url element to specify the URL of the primary server and the transport and port used for the connection.

Permissions

When connecting to another Diffusion server as a client, this secondary server can provide a principal and associated password. If a principal is not provided, the secondary server connects anonymously

To subscribe to topics on the primary server and replicate them locally, the secondary server's client session must have the select_topic and read_topic permissions for those topics. Ensure that the principal this secondary server uses is assigned a role with the appropriate permissions on the primary server. If the secondary server connects anonymously to the primary server, ensure anonymous sessions on the primary server are assigned the appropriate permissions.

Reconnection

Use the retry-delay element to specify the time in milliseconds between the connection or reconnection attempts that the secondary server makes to the primary server.

Use the reconnect-timeout element to specify the maximum time in milliseconds that the secondary server will attempt to reconnect to its existing session on the primary server after a disconnection. If this element is not specified, a value of 0 is assumed and reconnection is not attempted.

If the secondary server is configured to attempt to reconnect, it keeps a buffer of messages sent to the primary server. Use the recovery-buffer-size element to configure the size of this buffer.

Replicating topics

Each fanout-connection has one or more link elements. Each link element uses a topic selector to specify a set of topics on the primary server to replicate on this secondary server.

Note: The set of topics specified by a link cannot overlap the set of topics specified by any other link within either this fanout-connection or any of the others.
If you want missing topic handlers registered on the primary server to receive missing topic notifications when a subscription or fetch request is made on the secondary server to a part of the topic tree that matches a link selector, consider the following when configuring your secondary server links:
  • Avoid using regular expressions in the selectors you use to configure when setting up fan-out links on the secondary server. Topic selectors containing regular expressions increase the likelihood of false negatives and false positives when propagating missing topic notifications.
  • Ensure that the principal that the secondary server uses to make the fan-out connection to the primary server has the SELECT_TOPIC permission for the path prefix of the selector that triggered the missing topic notification.
For more information, see Using missing topic notifications with fan-out.

Configuring your primary server

The primary server in a fan-out configuration must be configured to handle serving the topics replicated by fan-out to the secondary server or servers.

Ensure that the primary server connector that the secondary server or servers connect to has a large enough queue to handle the number of primary server topics that will be replicated by fan-out. In the Connectors.xml file, inside the <connector> element that defines the connector used for fan-out connections, set the queue depth to greater than the number of fanned out topics:
<queue-definition>depth</queue-definition>

To allow the secondary server to reconnect, enable reconnection on the connector that the primary server uses to accept connections from the secondary server or servers. Ensure that the reconnection timeout (keep-alive) value for the connector is long enough to allow the secondary server time to reconnect. Set the maximum queue depth and recovery buffer sizes to values that are appropriate to the volume of messages you expect to occur between the primary and secondary servers.

For more information, see Connectors.xml.

Topic aliasing

Topic aliasing is not supported with fan-out. Ensure that it is disabled at the primary server.

In the primary server Publishers.xml file, set topic-aliasing as false for any publishers that create topics that are fanned out.
<topic-aliasing>false</topic-aliasing>
When starting the primary server ensure that diffusion.publishers.v5.topic.aliasing.disabled is set to true. Edit the diffusion.sh or diffusion.bat file to set it as a system property when starting the Diffusion server:
-Ddiffusion.publishers.v5.topic.aliasing.disabled=true