Interface FanOutConnectionConfig
- All Superinterfaces:
- Config
 When starting fan-out, if a fan-out client is unable to connect to the
 primary server, it will try again after the specified
 retry delay period.
 
 Upon losing the connection to the primary server the recovery process will
 depend upon whether a reconnect timeout has
 been configured. If reconnection is configured, the client will try to
 re-establish the connection until the specified amount of time has passed. It
 will wait for the configured retry delay period between attempts.
 
 If reconnection succeeds after a lost connection, fan-out will resume
 seamlessly. However, if reconnection fails, the replicated topic tree will be
 deleted and a new connection attempt will be rescheduled after the
 retry delay.
 
A load balancer may be used between secondary and primary server. If a load balancer is used and reconnection is configured, the load balancer should be configured for sticky routing.
- Since:
- 5.6
- 
Method SummaryModifier and TypeMethodDescriptionDeprecated.Adds a topic tree link to be replicated.intDeprecated.Returns the connection timeout.intDeprecated.Returns the input buffer size.Deprecated.Get a named fan-out replication link.getLinks()Deprecated.Returns a list of the replication links.intDeprecated.Returns the maximum queue size.getName()Deprecated.Gets the connection name.intDeprecated.Returns the output buffer size.Deprecated.Returns the password.Deprecated.Returns the security principal.intDeprecated.Returns the reconnect timeout value.intDeprecated.Returns the recovery buffer size.intDeprecated.Get the retry delay value.getUrl()Deprecated.Returns the URL of the primary server to connect to.intDeprecated.Returns the write timeout.voidsetConnectionTimeout(int timeout) Deprecated.Sets the connection timeout.voidsetInputBufferSize(int size) Deprecated.Sets the input buffer size for the connection.voidsetMaximumQueueSize(int queueSize) Deprecated.Sets the maximum queue size for messages queued to be sent to the primary server.voidsetOutputBufferSize(int size) Deprecated.Sets the output buffer size.voidsetPassword(String password) Deprecated.Sets a password to be used when authenticating with the primary server.voidsetPrincipal(String principal) Deprecated.Sets the security principal to use when authenticating with the primary server.voidsetReconnectTimeout(int timeout) Deprecated.Sets the overall reconnection timeout value.voidsetRecoveryBufferSize(int size) Deprecated.Set the recovery buffer size.voidsetRetryDelay(int delay) Deprecated.Specifies the number of milliseconds to wait after failing to connect or losing the connection to the primary server before trying to connect again.voidsetWriteTimeout(int timeout) Deprecated.Sets the write timeout value.
- 
Method Details- 
getNameString getName()Deprecated.Gets the connection name.- Returns:
- connection name
- Since:
- 6.0
 
- 
getUrlString getUrl()Deprecated.Returns the URL of the primary server to connect to.- Returns:
- the URL
 
- 
setRetryDelayDeprecated.Specifies the number of milliseconds to wait after failing to connect or losing the connection to the primary server before trying to connect again.If not explicitly specified, 1000ms (1 second) is assumed. - Parameters:
- delay- retry delay in milliseconds
- Throws:
- ConfigException- if the interval is invalid
- Since:
- 5.9
 
- 
getRetryDelayint getRetryDelay()Deprecated.Get the retry delay value.- Returns:
- retry delay in milliseconds
- Since:
- 5.9
 
- 
setPrincipalDeprecated.Sets the security principal to use when authenticating with the primary server.By default this will be "" representing an anonymous session. - Parameters:
- principal- the principal
- Throws:
- ConfigException- if- principalis null
 
- 
getPrincipalString getPrincipal()Deprecated.Returns the security principal.- Returns:
- the principal
 
- 
setPasswordDeprecated.Sets a password to be used when authenticating with the primary server.If not explicitly specified, it is assumed that no credentials are required for the connection. - Parameters:
- password- the password
- Throws:
- ConfigException- if- passwordis null
 
- 
getPasswordString getPassword()Deprecated.Returns the password.- Returns:
- password or null if no credentials specified
 
- 
setConnectionTimeoutDeprecated.Sets the connection timeout.The value constrains the time taken to establish a TCP connection to the server. The write timeoutconstrains the time taken to send the connection request. The server is responsible for limiting the overall time taken to complete a connection once it has received the request.If not specified, a value of 2 seconds is used. - Parameters:
- timeout- value in milliseconds. If this exceeds one hour (3600000ms) a warning will be logged and the time-out will be set to one hour.
- Throws:
- ConfigException- if an illegal timeout value is supplied
 
- 
getConnectionTimeoutint getConnectionTimeout()Deprecated.Returns the connection timeout.- Returns:
- connection timeout
 
- 
setWriteTimeoutDeprecated.Sets the write timeout value.This only constrains the writing of the initial connection request. If it is not possible to complete the write within this time, the connection is closed. If not specified, a value of 2 seconds is used. - Parameters:
- timeout- value in milliseconds. If this exceeds one hour (3600000ms) a warning will be logged and the time-out will be set to one hour.
- Throws:
- ConfigException- if- timeoutis invalid
 
- 
getWriteTimeoutint getWriteTimeout()Deprecated.Returns the write timeout.- Returns:
- write timeout
 
- 
setInputBufferSizeDeprecated.Sets the input buffer size for the connection.By default this is the same as the maximum message size. Setting to a larger value may improve throughput. Ideally the value should match the output buffer size configured at the primary server for the connector indicated by the url used for connection. - Parameters:
- size- input buffer size in bytes. This must not be less than the maximum message size and hence may not be less than 1024
- Throws:
- ConfigException- if the input buffer size is invalid
 
- 
getInputBufferSizeint getInputBufferSize()Deprecated.Returns the input buffer size.- Returns:
- the input buffer size
 
- 
setOutputBufferSizeDeprecated.Sets the output buffer size.By default this is the same as the maximum message size but increasing it can improve throughput. - Parameters:
- size- output buffer size in bytes. This must not be less than the maximum message size and hence may not be less than 1024
- Throws:
- ConfigException- if the output buffer size is invalid
 
- 
getOutputBufferSizeint getOutputBufferSize()Deprecated.Returns the output buffer size.- Returns:
- the output buffer size
 
- 
setReconnectTimeoutDeprecated.Sets the overall reconnection timeout value.This is the total amount of time that a fan-out client will spend attempting to reconnect to the primary server after losing the connection. If not explicitly specified, a value of 0 is assumed which means that reconnect is not enabled. - Parameters:
- timeout- the period of time (specified in milliseconds) that the client should allow to pass whilst attempting to reconnect to the primary server after a disconnection, before abandoning the reconnection process. A value of zero indicates that reconnection should not be performed (a new connection may still be attempted later after the- retryperiod).
- Throws:
- ConfigException- if the timeout value is invalid.
- Since:
- 5.9
 
- 
getReconnectTimeoutint getReconnectTimeout()Deprecated.Returns the reconnect timeout value.- Returns:
- reconnect timeout in milliseconds. A value of 0 indicates that reconnection is not enabled.
- Since:
- 5.9
 
- 
setRecoveryBufferSizeDeprecated.Set the recovery buffer size.If the primary server is configured to support reconnection, a session established with a non-zero reconnection timeoutretains a buffer of sent messages. If the session disconnects and reconnects, this buffer is used to re-send messages that the server has not received.If not explicitly specified, 10000 is assumed. - Parameters:
- size- the recovery buffer size in messages
- Throws:
- ConfigException- if the specified- sizeis negative
- Since:
- 5.9
 
- 
getRecoveryBufferSizeint getRecoveryBufferSize()Deprecated.Returns the recovery buffer size.- Returns:
- recovery buffer size as number of messages
- Since:
- 5.9
 
- 
setMaximumQueueSizeDeprecated.Sets the maximum queue size for messages queued to be sent to the primary server.This specifies the maximum size that the queue of messages for the primary server may reach before the connection is closed. This must be able to cater for messages that may be queued whilst disconnected awaiting reconnection. If this is not explicitly specified, 10000 is assumed. - Parameters:
- queueSize- the maximum queue size
- Throws:
- ConfigException- if the specified- queueSizeis invalid
- Since:
- 5.9
 
- 
getMaximumQueueSizeint getMaximumQueueSize()Deprecated.Returns the maximum queue size.- Returns:
- maximum queue size
- Since:
- 5.9
 
- 
addLinkDeprecated.Adds a topic tree link to be replicated. The link represents a selection of the topic tree at the primary server.Any topics that are selected by the specified selector will be replicated at the secondary server assuming they are of types that can be replicated. At least one such link should be specified for each connection but any number can be configured in order to separate segments of the topic tree. Care must be taken to ensure that topic tree segments do not overlap with other links or with other connections. If the same topics are selected from different primary servers, errors could occur when creating replicated topics. - Parameters:
- name- the name of the link
- selector- the selector associated with the link
- Returns:
- the new link config object which may be used to specify further configuration details for the link
- Throws:
- ConfigException- if the name or selector are not supplied or there is already a link defined with the same name or selector
- Since:
- 6.0
 
- 
getLinkDeprecated.Get a named fan-out replication link.- Parameters:
- name- the name of the link.
- Returns:
- a configuration object representing the link.
- Since:
- 6.0
 
- 
getLinksList<FanOutLinkConfig> getLinks()Deprecated.Returns a list of the replication links.- Returns:
- list of replicated links
 
 
- 
Fan-out is deprecated and will be removed in a future release. Use Remote Servers in preference.