The StreamBase Java API uses the following Java properties,
which you can set on the Java command line using
-Dproperty-name:value when you start a
StreamBase client. Or, you can set the property in your Java
client code using the System.setProperty()
method.
Note: Java clients that extend the StreamBase Client API use Java properties instead of environment variables.
Two examples are shown here. First, on the command line:
java -server -Dstreambase.tuple-connection-timeout=4000
-Dstreambase.reconnect-sleep=7000 MyClient
Or, in your Java client code:
System.setProperty("streambase.tuple-connection-timeout", "4000");
This table describes the StreamBase Java API properties.
| Property Name | Description |
|---|---|
streambase.log-level
|
Sets the minimum severity of messages that StreamBase
will write to syslog or stderr on UNIX, or to the
file on Windows. Default is 0, which
provides NOTICE level messages and
higher. Other values are:
|
streambase.uri
|
Override the default URI of the StreamBase Server. The
default is sb://localhost:10000.
|
streambase.max-queue-size
|
The maximum size of the queue that the StreamBase client will maintain when dequeuing result sets. Each entry contains a list of Tuples. The default is 500 result sets. |
streambase.tuple-connection-quiescent-limit
|
Controls how many milliseconds a Java StreamBase
dequeueing client will tolerate not receiving anything from the
StreamBase Server to which it is connected. The default
value is 120 seconds (120000). By
default, StreamBase Servers emit client heartbeats every
10 seconds, so that StreamBase applications have no
requirement to send data regularly. StreamBase Servers
can be configured to send heartbeats faster, slower, or not at all.
The quiescent timer only starts after the first heartbeat is
received. Thus, if a server never sends a heartbeat, clients will not
have quiescent protection.
|
streambase.tuple-connection-timeout
|
When using High Availability templates for the StreamBase application, this property sets a timeout value on reads and writes between the client and server. This timeout is used by the client to recognize failure of the server. Consider carefully when using this property. A timeout value that is too long may cause the client to hang for that period before it fails over to the other server. Too short of a value may cause the client to disconnect prematurely from the server if the server is busy. The value is in milliseconds, and the default is 15000 (15 seconds). A value of 0 disables the timeout (some operations will block forever). |
streambase.reconnect-sleep
|
When using High Availability templates for the StreamBase application, this property sets how often the client should try to reconnect to the primary or secondary machine when the connection to the server is dropped. The value is in milliseconds, and the default is 5000 (5 seconds). |
streambase.read-buf-size
|
This property is used to determine the default read buffer size used by the client when dequeuing tuples. Changing this value may have an effect upon client dequeue performance. The value is in bytes, and the default is 32k. |
streambase.write-buf-size
|
This property is used to determine the default write buffer size used by the client when enqueueing tuples. Changing this value may have an effect upon client enqueue performance. The value is in bytes, and the default is 32k. |
