Reference for Live Datamart Client API Listener Configuration

Overview

This article provides a reference for writing a Live Datamart Client API Listener HOCON configuration file.

The Live Datamart client API listener configuration defines port numbers and secure communication indicators. It is separate from the base StreamBase engine configuration and can therefore be managed separately without having to recreate an application archive and redeploy the application whenever (for example) a port number changes.

Required Header Lines

Each configuration file must contain the following header lines, typically found at the beginning of each file:

name

Specifies an arbitrary, case-sensitive string to name this configuration, which must be unique among other files with the same type, if any. Configuration files can refer to each other by this name. Select a name that reminds you of this configuration's type and purpose. For example:

name = "my-ldm-api-settings"
version

Specifies an arbitrary version number that you can use to keep track of file versions for this configuration type in your development project. The maintenance of version numbers is under user control; StreamBase does not compare versions when loading configuration files during the fragment launch process. The version number is a string value, and can contain any combination of characters and numbers. For example:

version = "1.0.0"
type

This essential setting specifies the unique HOCON configuration type described on this page.

type = "com.tibco.ep.ldm.configuration.ldmclientapilistener"

The header lines taken together constitute a unique signature for each HOCON file in a project's configurations folder. Each project's configurations folder can contain only one file with the same signature.

In addition, the configuration top-level element is the same for all HOCON file types.

configuration

On a line below the header element lines, enter the word configuration followed by an open brace. The configuration element is a sibling of the name, version, and type elements, and serves as a wrapper around this type's elements described below. The file must end with the matching close brace.

configuration = {
...
...
}

HOCON Elements Explained

Below shows the configuration's HOCON elements, its name-values, usage, and syntax example, where applicable.

ClientAPIListener

Describes Live Datamart client API listener configuration settings including the following dependent elements.

associatedWithEngines

If you want to manually restrict this object to be associated with specific engines, do so here. Each entry can be a specific engine name or a regular expression that can apply to more than one engine. This name-value pair is optional and has no default value. If not present, the configuration uses a default engine association based on its location in a fragment or application archive, or in a node deploy configuration.

For example:

associatedWithEngines = [ "javaengine", "otherengine[0-9]" ]
portNumber

Int. TCP port for the LiveView client API to listen on. This name-value pair is optional and its default value is 10080. A zero value means that the server will find a random port to listen on. As a TCP port number, its range is between 0 and 65535.

For example:

portNumber = 10088
secure

Bool. A secure-transport indicator. If true, use TLS to secure communication to the client; if false do not. Enabling secure communication requires that the engine have a secure communication configuration, or this indicator value is ignored. This name-value pair is optional and its default value is false.

For example:

secure = false

HOCON Configuration File Sample

The following shows an example of the com.tibco.ep.ldm.configuration.ldmclientapilistener type.

name = "ldmport"
version = "1.0.0"
type = "com.tibco.ep.ldm.configuration.ldmclientapilistener"
configuration = {
  ClientAPIListener = {
    portNumber = 10088
    secure = false
  }
}