FabricTransportRemotingSettings Class

  • java.lang.Object
    • microsoft.servicefabric.services.remoting.fabrictransport.FabricTransportRemotingSettings

public class FabricTransportRemotingSettings

Settings that configures the FabricTransport communication.

Constructor Summary

Constructor Description
FabricTransportRemotingSettings()

Creates a new FabricTransportRemotingSettings with default Values.

Method Summary

Modifier and Type Method and Description
Duration getConnectTimeout()

Connect timeout specifies the maximum time allowed for the connection to be established successfully.

Remarks:Default Value for ConnectTimeout Timeout is set as 5 seconds.

FabricTransportRemotingSettings getDefault()

FabricTransportSettings returns the default Settings .Loads the configuration file from default Config Package"Config" , if not found then try to load from default config file "ClientExeName.Settings.xml" from Client Exe directory.

FabricTransportRemotingSettings getDefault(String sectionName)

FabricTransportSettings returns the default Settings .Loads the configuration file from default Config Package"Config" , if not found then try to load from default config file "ClientExeName.Settings.xml" from Client Exe directory.

FabricTransportSettings getInternalSettings()
Duration getKeepAliveTimeout()

KeepAliveTimeout is provides a way to configure Tcp keep-alive option.

Remarks:Default Value for KeepAliveTimeout Timeout is set as TimeSpan.Zero. which indicates we disable the tcp keepalive option. If you are using loadbalancer , you may need to configure this in order to avoid the loadbalancer to close the connection after certain time

Long getMaxConcurrentCalls()

MaxConcurrentCalls represents maximum number of messages actively service processes at one time.

Remarks:Defaults value for the MaxConcurrentCalls is to the Number of processors.

Long getMaxMessageSize()

MaxMessageSize represents the maximum size for a message that can be received on a channel configured with this setting.

Remarks:Default Value for MaxMessageSize used is 4194304 bytes

Long getMaxQueueSize()

The maximum size, of a queue that stores messages while they are processed for an endpoint configured with this setting.

Remarks:Default value is 10,000 messages

Duration getOperationTimeout()

Operation Timeout which governs the whole process of sending a message, including receiving a reply message for a request/reply service operation. This timeout also applies when sending reply messages from a callback contract method.

Remarks:Default Value for Operation Timeout is set as 5 mins

SecurityCredentials getSecurityCredentials()

Security credentials for securing the communication

Remarks:Default Value for SecurityCredentials is None SecurityCredential can be of type x509SecurityCredentail X509Credentialsor WindowsCredentials WindowsCredentials

FabricTransportRemotingSettings loadFrom(String sectionName)

Loads the FabricTransport settings from a sectionName specified in the configuration file Configuration File can be specified using the filePath or using the name of the configuration package specified in the service manifest . It will first try to load config using configPackageName . if configPackageName is not specified then try to load from filePath.

Remarks: The following are the parameter names that should be provided in the configuration file,to be recognizable by service fabric to load the transport settings. 1. MaxQueueSize - value in long. 2. MaxMessageSize - value in bytes. 3. MaxConcurrentCalls - value in long. 4. SecurityCredentials - SecurityCredentials value. 5. OperationTimeoutInSeconds - value in seconds. 6. KeepAliveTimeoutInSeconds

  • value in seconds.

FabricTransportRemotingSettings loadFromConfigPackage(String sectionName, String configPackageName)

Loads the FabricTransport settings from a sectionName specified in the configuration file Configuration File can be specified using the filePath or using the name of the configuration package specified in the service manifest . It will first try to load config using configPackageName . if configPackageName is not specified then try to load from filePath.

Remarks: The following are the parameter names that should be provided in the configuration file,to be recognizable by service fabric to load the transport settings. 1. MaxQueueSize - value in long. 2. MaxMessageSize - value in bytes. 3. MaxConcurrentCalls - value in long. 4. SecurityCredentials - SecurityCredentials value. 5. OperationTimeoutInSeconds - value in seconds. 6. KeepAliveTimeoutInSeconds

  • value in seconds.

FabricTransportRemotingSettings loadFromFile(String sectionName, String filePath)

Loads the FabricTransport settings from a sectionName specified in the configuration file Configuration File can be specified using the filePath or using the name of the configuration package specified in the service manifest . It will first try to load config using configPackageName . if configPackageName is not specified then try to load from filePath.

Remarks: The following are the parameter names that should be provided in the configuration file,to be recognizable by service fabric to load the transport settings. 1. MaxQueueSize - value in long. 2. MaxMessageSize - value in bytes. 3. MaxConcurrentCalls - value in long. 4. SecurityCredentials - SecurityCredentials value. 5. OperationTimeoutInSeconds - value in seconds. 6. KeepAliveTimeoutInSeconds

  • value in seconds.

void setConnectTimeout(Duration connectTimeout)

Connect timeout specifies the maximum time allowed for the connection to be established successfully.

Remarks:Default Value for ConnectTimeout Timeout is set as 5 seconds.

void setKeepAliveTimeout(Duration keepAliveTimeout)

KeepAliveTimeout is provides a way to configure Tcp keep-alive option.

Remarks:Default Value for KeepAliveTimeout Timeout is set as TimeSpan.Zero. which indicates we disable the tcp keepalive option. If you are using loadbalancer , you may need to configure this in order to avoid the loadbalancer to close the connection after certain time

void setMaxConcurrentCalls(Long maxConcurrentCalls)

MaxConcurrentCalls represents maximum number of messages actively service processes at one time.

Remarks:Defaults value for the MaxConcurrentCalls is to the Number of processors.

void setMaxMessageSize(Long maxMessageSize)

MaxMessageSize represents the maximum size for a message that can be received on a channel configured with this setting.

Remarks:Default Value for MaxMessageSize used is 4194304 bytes

void setMaxQueueSize(Long maxQueueSize)

The maximum size, of a queue that stores messages while they are processed for an endpoint configured with this setting.

Remarks:Default value is 10,000 messages

void setOperationTimeout(Duration operationTimeout)

Operation Timeout which governs the whole process of sending a message, including receiving a reply message for a request/reply service operation. This timeout also applies when sending reply messages from a callback contract method.

Remarks:Default Value for Operation Timeout is set as 5 mins

void setSecurityCredentials(SecurityCredentials securityCredentials)

Security credentials for securing the communication

Remarks:Default Value for SecurityCredentials is None SecurityCredential can be of type x509SecurityCredentail X509Credentials or WindowsCredentials WindowsCredentials

FabricTransportRemotingSettings tryLoadFrom(String sectionName)

Try to load the FabricTransport settings from a sectionName specified in the configuration file. Configuration File can be specified using the filePath or using the name of the configuration package specified in the service manifest . It will first try to load config using configPackageName . if configPackageName is not specified then try to load from filePath.

Remarks:The following are the parameter names that should be provided in the configuration file,to be recognizable by service fabric to load the transport settings. 1. MaxQueueSize - value in long. 2. MaxMessageSize - value in bytes. 3. MaxConcurrentCalls - value in long. 4. SecurityCredentials - SecurityCredentials value. 5. OperationTimeoutInSeconds - value in seconds. 6. KeepAliveTimeoutInSeconds

  • value in seconds.

FabricTransportRemotingSettings tryLoadFromConfigPackage(String sectionName, String configPackageName)

Try to load the FabricTransport settings from a sectionName specified in the configuration file. Configuration File can be specified using the filePath or using the name of the configuration package specified in the service manifest . It will first try to load config using configPackageName . if configPackageName is not specified then try to load from filePath.

Remarks:The following are the parameter names that should be provided in the configuration file,to be recognizable by service fabric to load the transport settings. 1. MaxQueueSize - value in long. 2. MaxMessageSize - value in bytes. 3. MaxConcurrentCalls - value in long. 4. SecurityCredentials - SecurityCredentials value. 5. OperationTimeoutInSeconds - value in seconds. 6. KeepAliveTimeoutInSeconds

  • value in seconds.

FabricTransportRemotingSettings tryLoadFromFile(String sectionName, String filePath)

Try to load the FabricTransport settings from a sectionName specified in the configuration file. Configuration File can be specified using the filePath or using the name of the configuration package specified in the service manifest . It will first try to load config using configPackageName . if configPackageName is not specified then try to load from filePath.

Remarks:The following are the parameter names that should be provided in the configuration file,to be recognizable by service fabric to load the transport settings. 1. MaxQueueSize - value in long. 2. MaxMessageSize - value in bytes. 3. MaxConcurrentCalls - value in long. 4. SecurityCredentials - SecurityCredentials value. 5. OperationTimeoutInSeconds - value in seconds. 6. KeepAliveTimeoutInSeconds

  • value in seconds.

Constructor Details

FabricTransportRemotingSettings

public FabricTransportRemotingSettings()

Creates a new FabricTransportRemotingSettings with default Values.

Method Details

getConnectTimeout

public Duration getConnectTimeout()

Connect timeout specifies the maximum time allowed for the connection to be established successfully.

Remarks:Default Value for ConnectTimeout Timeout is set as 5 seconds.

Returns:

ConnectTimeout as java.time.Duration

getDefault

public static FabricTransportRemotingSettings getDefault()

FabricTransportSettings returns the default Settings .Loads the configuration file from default Config Package"Config" , if not found then try to load from default config file "ClientExeName.Settings.xml" from Client Exe directory.

Returns:

FabricTransportSettings

getDefault

public static FabricTransportRemotingSettings getDefault(String sectionName)

FabricTransportSettings returns the default Settings .Loads the configuration file from default Config Package"Config" , if not found then try to load from default config file "ClientExeName.Settings.xml" from Client Exe directory.

Parameters:

sectionName - Name of the section within the configuration file. If not found section in configuration file, it will return the default Settings

Returns:

FabricTransportSettings

getInternalSettings

public FabricTransportSettings getInternalSettings()

getKeepAliveTimeout

public Duration getKeepAliveTimeout()

KeepAliveTimeout is provides a way to configure Tcp keep-alive option.

Remarks:Default Value for KeepAliveTimeout Timeout is set as TimeSpan.Zero. which indicates we disable the tcp keepalive option. If you are using loadbalancer , you may need to configure this in order to avoid the loadbalancer to close the connection after certain time

Returns:

KeepAliveTimeout as java.time.Duration

getMaxConcurrentCalls

public Long getMaxConcurrentCalls()

MaxConcurrentCalls represents maximum number of messages actively service processes at one time.

Remarks:Defaults value for the MaxConcurrentCalls is to the Number of processors.

Returns:

MaxConcurrentCalls is the upper limit of active messages in the service.

getMaxMessageSize

public Long getMaxMessageSize()

MaxMessageSize represents the maximum size for a message that can be received on a channel configured with this setting.

Remarks:Default Value for MaxMessageSize used is 4194304 bytes

Returns:

Maximum size of the message in bytes.

getMaxQueueSize

public Long getMaxQueueSize()

The maximum size, of a queue that stores messages while they are processed for an endpoint configured with this setting.

Remarks:Default value is 10,000 messages

Returns:

Max Size for a Queue that recieves messages from the channel.

getOperationTimeout

public Duration getOperationTimeout()

Operation Timeout which governs the whole process of sending a message, including receiving a reply message for a request/reply service operation. This timeout also applies when sending reply messages from a callback contract method.

Remarks:Default Value for Operation Timeout is set as 5 mins

Returns:

OperationTimeout as java.time.Duration

getSecurityCredentials

public SecurityCredentials getSecurityCredentials()

Security credentials for securing the communication

Remarks:Default Value for SecurityCredentials is None SecurityCredential can be of type x509SecurityCredentail X509Credentialsor WindowsCredentials WindowsCredentials

Returns:

SecurityCredentials as SecurityCredentials

loadFrom

public static FabricTransportRemotingSettings loadFrom(String sectionName)

Loads the FabricTransport settings from a sectionName specified in the configuration file Configuration File can be specified using the filePath or using the name of the configuration package specified in the service manifest . It will first try to load config using configPackageName . if configPackageName is not specified then try to load from filePath.

Remarks: The following are the parameter names that should be provided in the configuration file,to be recognizable by service fabric to load the transport settings. 1. MaxQueueSize - value in long. 2. MaxMessageSize - value in bytes. 3. MaxConcurrentCalls - value in long. 4. SecurityCredentials - SecurityCredentials value. 5. OperationTimeoutInSeconds - value in seconds. 6. KeepAliveTimeoutInSeconds

  • value in seconds.

Parameters:

sectionName - Name of the section within the configuration file. If not found section in configuration file, it will throw ArgumentException

Returns:

FabricTransportSettings

loadFromConfigPackage

public static FabricTransportRemotingSettings loadFromConfigPackage(String sectionName, String configPackageName)

Loads the FabricTransport settings from a sectionName specified in the configuration file Configuration File can be specified using the filePath or using the name of the configuration package specified in the service manifest . It will first try to load config using configPackageName . if configPackageName is not specified then try to load from filePath.

Remarks: The following are the parameter names that should be provided in the configuration file,to be recognizable by service fabric to load the transport settings. 1. MaxQueueSize - value in long. 2. MaxMessageSize - value in bytes. 3. MaxConcurrentCalls - value in long. 4. SecurityCredentials - SecurityCredentials value. 5. OperationTimeoutInSeconds - value in seconds. 6. KeepAliveTimeoutInSeconds

  • value in seconds.

Parameters:

sectionName - Name of the section within the configuration file. If not found section in configuration file, it will throw ArgumentException
configPackageName - Name of the configuration package.If its null or empty,it will check for file in filePath

Returns:

FabricTransportSettings

loadFromFile

public static FabricTransportRemotingSettings loadFromFile(String sectionName, String filePath)

Loads the FabricTransport settings from a sectionName specified in the configuration file Configuration File can be specified using the filePath or using the name of the configuration package specified in the service manifest . It will first try to load config using configPackageName . if configPackageName is not specified then try to load from filePath.

Remarks: The following are the parameter names that should be provided in the configuration file,to be recognizable by service fabric to load the transport settings. 1. MaxQueueSize - value in long. 2. MaxMessageSize - value in bytes. 3. MaxConcurrentCalls - value in long. 4. SecurityCredentials - SecurityCredentials value. 5. OperationTimeoutInSeconds - value in seconds. 6. KeepAliveTimeoutInSeconds

  • value in seconds.

Parameters:

sectionName - Name of the section within the configuration file. If not found section in configuration file, it will throw ArgumentException
filePath - Full path of the file where the settings will be loaded from. If not specified , it will first try to load from default Config Package"Config" , if not found then load from Settings "ClientExeName.Settings.xml" present in Client Exe directory.

Returns:

FabricTransportSettings

setConnectTimeout

public void setConnectTimeout(Duration connectTimeout)

Connect timeout specifies the maximum time allowed for the connection to be established successfully.

Remarks:Default Value for ConnectTimeout Timeout is set as 5 seconds.

Parameters:

connectTimeout - ConnectTimeout as java.time.Duration

setKeepAliveTimeout

public void setKeepAliveTimeout(Duration keepAliveTimeout)

KeepAliveTimeout is provides a way to configure Tcp keep-alive option.

Remarks:Default Value for KeepAliveTimeout Timeout is set as TimeSpan.Zero. which indicates we disable the tcp keepalive option. If you are using loadbalancer , you may need to configure this in order to avoid the loadbalancer to close the connection after certain time

Parameters:

keepAliveTimeout - as java.time.Duration

setMaxConcurrentCalls

public void setMaxConcurrentCalls(Long maxConcurrentCalls)

MaxConcurrentCalls represents maximum number of messages actively service processes at one time.

Remarks:Defaults value for the MaxConcurrentCalls is to the Number of processors.

Parameters:

maxConcurrentCalls - MaxConcurrentCalls is the upper limit of active messages in the service.

setMaxMessageSize

public void setMaxMessageSize(Long maxMessageSize)

MaxMessageSize represents the maximum size for a message that can be received on a channel configured with this setting.

Remarks:Default Value for MaxMessageSize used is 4194304 bytes

Parameters:

maxMessageSize - Maximum size of the message in bytes.

setMaxQueueSize

public void setMaxQueueSize(Long maxQueueSize)

The maximum size, of a queue that stores messages while they are processed for an endpoint configured with this setting.

Remarks:Default value is 10,000 messages

Parameters:

maxQueueSize - Max Size for a Queue that recieves messages from the channel.

setOperationTimeout

public void setOperationTimeout(Duration operationTimeout)

Operation Timeout which governs the whole process of sending a message, including receiving a reply message for a request/reply service operation. This timeout also applies when sending reply messages from a callback contract method.

Remarks:Default Value for Operation Timeout is set as 5 mins

Parameters:

operationTimeout - as java.time.Duration

setSecurityCredentials

public void setSecurityCredentials(SecurityCredentials securityCredentials)

Security credentials for securing the communication

Remarks:Default Value for SecurityCredentials is None SecurityCredential can be of type x509SecurityCredentail X509Credentials or WindowsCredentials WindowsCredentials

Parameters:

securityCredentials - SecurityCredentials as SecurityCredentials

tryLoadFrom

public static FabricTransportRemotingSettings tryLoadFrom(String sectionName)

Try to load the FabricTransport settings from a sectionName specified in the configuration file. Configuration File can be specified using the filePath or using the name of the configuration package specified in the service manifest . It will first try to load config using configPackageName . if configPackageName is not specified then try to load from filePath.

Remarks:The following are the parameter names that should be provided in the configuration file,to be recognizable by service fabric to load the transport settings. 1. MaxQueueSize - value in long. 2. MaxMessageSize - value in bytes. 3. MaxConcurrentCalls - value in long. 4. SecurityCredentials - SecurityCredentials value. 5. OperationTimeoutInSeconds - value in seconds. 6. KeepAliveTimeoutInSeconds

  • value in seconds.

Parameters:

sectionName - Name of the section within the configuration file. If not found section in configuration file, it return false

Returns:

Boolean specifies whether the settings get loaded successfully from Config. It returns true when load from Config succeeded, else return false.

tryLoadFromConfigPackage

public static FabricTransportRemotingSettings tryLoadFromConfigPackage(String sectionName, String configPackageName)

Try to load the FabricTransport settings from a sectionName specified in the configuration file. Configuration File can be specified using the filePath or using the name of the configuration package specified in the service manifest . It will first try to load config using configPackageName . if configPackageName is not specified then try to load from filePath.

Remarks:The following are the parameter names that should be provided in the configuration file,to be recognizable by service fabric to load the transport settings. 1. MaxQueueSize - value in long. 2. MaxMessageSize - value in bytes. 3. MaxConcurrentCalls - value in long. 4. SecurityCredentials - SecurityCredentials value. 5. OperationTimeoutInSeconds - value in seconds. 6. KeepAliveTimeoutInSeconds

  • value in seconds.

Parameters:

sectionName - Name of the section within the configuration file. If not found section in configuration file, it return false
configPackageName - Name of the configuration package. If its null or empty,it will check for file in filePath

Returns:

Boolean specifies whether the settings get loaded successfully from Config. It returns true when load from Config succeeded, else return false.

tryLoadFromFile

public static FabricTransportRemotingSettings tryLoadFromFile(String sectionName, String filePath)

Try to load the FabricTransport settings from a sectionName specified in the configuration file. Configuration File can be specified using the filePath or using the name of the configuration package specified in the service manifest . It will first try to load config using configPackageName . if configPackageName is not specified then try to load from filePath.

Remarks:The following are the parameter names that should be provided in the configuration file,to be recognizable by service fabric to load the transport settings. 1. MaxQueueSize - value in long. 2. MaxMessageSize - value in bytes. 3. MaxConcurrentCalls - value in long. 4. SecurityCredentials - SecurityCredentials value. 5. OperationTimeoutInSeconds - value in seconds. 6. KeepAliveTimeoutInSeconds

  • value in seconds.

Parameters:

sectionName - Name of the section within the configuration file. If not found section in configuration file, it return false
filePath - Full path of the file where the settings will be loaded from. If not specified , it will first try to load from default Config Package"Config" , if not found then load from Settings "ClientExeName.Settings.xml" present in Client Exe directory.

Returns:

Boolean specifies whether the settings get loaded successfully from Config. It returns true when load from Config succeeded, else return false.

Applies to