The StreamBase Java API uses the Java properties described on this page,
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.codegen.trace-tuples
|
When set to true, you can use the runtime tracing
features of StreamBase Server, as described in Runtime Tracing.
|
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.max-queue-size
|
The maximum size of the queue that the StreamBase client is to maintain when dequeuing result sets. Each entry contains a list of tuples. The default is 500 result sets. |
streambase.read-buf-size
|
Use this property to specify the default read buffer size used by the client
when dequeuing tuples. Changing this value may have an effect on client dequeue
performance.
The value is in bytes, and the default is 32k. |
streambase.reconnect-sleep
|
In a high availability StreamBase application environment, 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.tuple-connection-quiescent-limit
|
Controls how many milliseconds a Java StreamBase dequeuing 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
|
In a high availability StreamBase application environment, 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.uri
|
Override the default URI of the StreamBase Server. The default is
sb://localhost:10000. See sburi for the syntax of
StreamBase URIs.
|
streambase.write-buf-size
|
Use this property to specify the default write buffer size used by the client
when enqueuing tuples. Changing this value may have an effect on client enqueue
performance.
The value is in bytes, and the default is 32k. |
