Skip to content

Configuration

SAPIRetryPolicy

Defines the retry policy for connection attempts and operations.

Field Type Description
maxAttempts unsigned int Maximum number of attempts before timeout
timeout unsigned int Timeout for a single attempt (ms)
retryInterval unsigned int Interval between attempts (ms)
retryScaling float Retry interval backoff multiplier (>= 1)

SAPISocketConfig

Configures expected socket behavior in terms of round trip times and data rates.

Field Type Description
socRoundTripTime int Expected maximum round trip time to server (ms)
socSendRate int Expected send rate per connection (bytes/sec)
socReceiveRate int Expected receive rate per connection (bytes/sec)

SAPITLS

Settings for TLS configuration.

Field Type Description
CA char* TLS CA certificate
CAFile char* File location of TLS CA certificate (overrides tlsCA)
cert char* TLS certificate
certFile char* File location of TLS certificate (overrides tlsCert)
key char* Certificate key
keyFile char* File location of certificate key (overrides tlsKey)
verifyClient bool Verify incoming certificate validity
verifyServer bool Verify outgoing certificate validity

SAPIConfig

Main configuration structure for client connections.

Field Type Description
discoverySvcHosts char** Discovery servers' addresses and ports
discoverySvcHostsCount int Discovery servers count
username char* User name
password char* Password
listenHosts char** Hosts for local TCP server binding
listenHostsCount int Listen hosts count
listenPorts char* Ports for incoming connections
advertiseHosts char** Advertised hosts for incoming connections
advertiseHostsCount int Advertise hosts count
advertisePorts char* Ports advertised as accepting incoming
connTimeout int Connection timeout (-1 waits forever) in milliseconds
bridgeTimeout int Initial RT bridge connection timeout (-1 waits forever) in milliseconds
gatewayStrategy short Gateway strategy
gatewayHosts char** Array containing gateway details
gatewayHostsCount int Gateway servers count
instanceName char* Process Name
version int Code version
build char* Build information
scs char** Service classes of interest
scsCount int Number of strings in scs
retryPolicy SAPIRetryPolicy* Default retry policy
rtConfig SAPIRTConfig* Default RT configuration
socketConfig SAPISocketConfig* Socket option configuration
sapiCallbacks SAPICallbacks* Event callbacks
domain char* Domain class
serviceClass char* Service class
family char* Data family
addrs char** Network interface addresses and ports
addrsCount int Number of strings in addrs
udpPort int UDP port if used
gwWorkersCount short Number of GW worker threads
rpWorkersCount short Number of RP worker threads
mqWorkersCount short Number of MQ worker threads
pubWorkersCount short Number of publish worker threads
dsWorkersCount short Number of DS worker threads
reqMaxPending int Max number of in-flight API requests
reqMaxPendingBlock bool Block or reject requests after threshold reached
useTLS bool Use TLS for remote communication
tls SAPITLS* TLS settings for SAPI connections
sapiProtocol unsigned char Programming language interacting with SAPI (0x02 C, 0x04 JAVA, 0x05 C#)

KxsResponse

Structure for handling responses.

Field Type Description
reqCorr long long Request Correlator
queueTm int Queue time (ms)
svcTm int Service time (ms)
rc short Return code
ac short Application code
ai char* Application information
aiLen int Length of ai field
header union Response header
headerLen int Length of the header
payload union Response payload
payloadLen int Length of the payload

Enums

SAPIAckMode

Specifies acknowledgment behavior for queue listeners.

Value Description
SAPI_ACK_UNKNOWN Not yet set
SAPI_ACK_AUTO Auto acknowledgment when queue handler returns true
SAPI_ACK_CLIENT Client must explicitly acknowledge using sapiAckQueue
SAPI_ACK_NONE No acknowledgment sent; server considers acknowledged on send
"""