Configuration

Sample YAML Configuration File

The sample config/activespaces-sink.yaml sink connector configuration file included with the TIBCO ActiveSpaces Connector for Apache Pulsar (shown below) is fairly minimal and designed to work well with the Test Drive procedure.

tenant: public
namespace: default
name: activespaces-sink
runtimeFlags: "-Djava.library.path=/opt/tibco/ftl/current-version/lib:/opt/tibco/as/current-version/lib"

configs:
    # ActiveSpaces-specific config
    tableName: "as-demo"
    autoCreateColumns: "true"
    autoCreateTable: "true"
    primaryKeys: "customerID long"
Note:

You must include the paths to both your FTL and ActiveSpaces lib directories in your java.library.path by setting the Apache Pulsar runtimeFlags option as shown in the sample configuration file.

Parameters

The TIBCO ActiveSpaces Connector for Apache Pulsar supports the configuration options shown below.

Parameter Name Description
gridConnectURLs Required. Pipe-delimited list of ActiveSpaces grid connection URLs, e.g., "http://foo.bar:8080|http://bar.biz:8585"
gridName Name of ActiveSpaces grid to connect to.

Default: "_default"

gridUsername ActiveSpaces grid username.

Default: (ActiveSpaces grid setting)

gridPassword ActiveSpaces grid password.

Default: (ActiveSpaces grid setting)

gridTrustType Required if using a secure (https) grid. ActiveSpaces grid trust type. Can be "everyone" (not secure!), "file", or "string".

Default: (ActiveSpaces grid setting)

gridTrustFile Path to the trust file to use if gridTrustType is set to "file".

Default: (ActiveSpaces grid setting)

gridTrustString String containing a PEM-formatted certificate to trust. Used if gridTrustType is set to "string".

Default: (ActiveSpaces grid setting)

gridClientLabel ActiveSpaces grid client label. Can be any string. Used as a user-level identifier for monitoring.

Default: (ActiveSpaces grid setting)

gridLogLevel Debug log level for ActiveSpaces-related logging. In ascending order of verbosity, values can be "warn", "info", "verbose", or "debug".

Default: "info"

gridBindStrategy ActiveSpaces grid proxy binding strategy. Can be "random" or "named".

Default: "random"

gridConnectProxyNames Pipe-delimited list of ActiveSpaces proxy names to bind to. Used if gridBindStrategy is set to "named".

Default: (ActiveSpaces grid setting)

gridConnectNumResponses Number of different proxy responses to wait for before choosing an ActiveSpaces proxy to bind to.

Default: (ActiveSpaces grid setting)

gridConnectNumRetries Number of times to attempt initial connection to a grid server before giving up.

Default: (ActiveSpaces grid setting)

gridConnectTimeout How long to wait, in seconds, for an initial successful ActiveSpaces grid connection.

Default: (ActiveSpaces grid setting)

gridTimeout How long to wait, in seconds, for responses to individual ActiveSpaces grid operations (e.g., inserting a new row).

Default: (ActiveSpaces grid setting)

tableName Required. Name of the ActiveSpaces table to insert rows into. The table must already exist in the ActiveSpaces grid unless autoCreateTable has been set to "true", in which case the ActiveSpaces sink will attempt to create the table if it does not exist.
primaryKeys Required if autoCreateTable is "true"``. Column names and types, in tibdg 'table create' format, to use as the primary keys if the table is auto-created. E.g. "customerID LONG" or "key LONG name STRING".

If autoCreateTable is "false" this value is ignored.

autoCreateTable If "true" and the configured ActiveSpaces table does not already exist, attempt to create it. The table's primary key(s) must be specified in the primaryKeys option.

Default: "false"

autoCreateColumns If "true" and an incoming message contains a field that has no corresponding column in the configured ActiveSpaces table, attempt to add a corresponding column to the table.

Default: "false"

autoMapFieldsToColumns If an explicit mapping from message fields to ActiveSpaces table columns is not provided, attempt to map fields to columns automatically. To successfully map a field to a column, the name and data type of the field and column must match. If multiple fields in the incoming message match the name of a column in the table, preference is given first to a field with an exact case-sensitive name match, and secondarily to the matching field that appears first within the incoming message. If the incoming message contains a field with no corresponding table column and autoCreateColumns is "true", then the sink attempts to create a corresponding column in the table of the correct type and map the field to it; otherwise fields with no corresponding column are ignored.

Default: "true"

fieldToColumnMappings A list of explicit message field name to ActiveSpaces table column name mappings. If set, the value of autoMapFieldsToColumns is ignored and automatic mapping is performed (i.e., only those mappings explicitly specified in the list are performed).

For example:

fieldToColumnMappings:
    - "fieldName": "FooField"
      "columnName": "foocolumn"
    - "fieldName": "barfield"
      "columnName": "barcol"

Each field/column pair in a mapping must be of the same type (i.e. both must be string, or both must be long, etc.). String matching is case insensitive, and characters in ActiveSpaces are converted/stored as lowercase.

Default: (none)