StreamBase AdapterGroup Configuration

Overview

This article provides a reference for generating a StreamBase configuration file for a certain subset of adapters and operators, where the HOCON type is com.tibco.ep.streambase.configuration.adapter and the root object is AdapterGroup.

Most StreamBase adapters are configured with settings made in the Properties view of their components on the Studio canvas.

However, a small set of operators and adapters have more complex requirements. Prior to StreamBase 10.5.0, these complex requirements were specified with a configuration file named adapter-configurations.xml which had to reside in the Studio project's src/main/resources folder. As of 10.5.0, this XML format is deprecated in favor of the HOCON format described on this page.

Configuration files of this type and root object can be edited as usual with the StreamBase Configuration File Editor. StreamBase Studio also provides an Edit button in the Properties view of any supported adapter as a shortcut to the Editor.

Adapters and operators that are configurable using the AdapterGroup root object include:

TIBCO ActiveSpaces Operators MQTT Client Adapters (Publish, Subscribe, Ack)
Apache Cassandra Operators OPC UA Adapters
Cluster Topic Publisher and Subscriber Adapters Python Operator
CME iLink Order Routing Adapter RabbitMQ Adapters (Consumer, Producer, Ack, Nack)
Diameter Client Adapters (Input, Output, Controller) Web Server Request Adapter
Diameter Server Adapters (Input, Output, Controller) Web Output Adapter, Web Input Adapter
Apache HBase Operators Web Input Response Adapter, Web Server Request Adapter
Apache Kudu Operators WITS Adapter, WITS Controller Adapter

If your project contains an adapter-configurations.xml, Studio offers to convert it to HOCON format when you click the Edit button in the Properties view. Once converted, Studio:

  • Creates a configuration file in HOCON format and places it in your project's src/main/configurations folder.

  • Comments out the individual section of the adapter-configurations.xml file that refers to the adapter in question, and ignores that section going forward.

Each configuration file must contain the following:

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 = "AdapterGroup"
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.streambase.configuration.adapter"
configuration

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

Root Object

There is one root object in configuration files with type com.tibco.ep.streambase.configuration.adapter that affects the adapters and operators listed here:

  • AdapterGroup

Note

The type com.tibco.ep.streambase.configuration.adapter also contains an additional root object, JMSAdapter. For more information about this object see StreamBase JMS Adapter Configuration.

Objects and Properties

This section shows the subordinate objects, properties, usage, and syntax for the AdapterGroup root object.

AdapterGroup

Required. An adapter group type defines a collection of EventFlow adapter configurations, indexed by adapter type.

associatedWithEngines

If you want to restrict this object to be associated with specific engines, do so here. Each array value can be a specific engine name or a regular expression that applies to more than one engine. This array is optional and has no default value. If not present, the configuration is associated with all engines. This is a property of the AdapterGroup root object, and thereby applies to all adapters configured in the same file.

For example:

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

A collection of one or more EventFlow adapter configurations, indexed by adapter type. This object is required and must contain at least one configuration. The adapter type strings to use here are shown in the Required Identifier String column:

Operator or Adapter Required Identifier String
TIBCO ActiveSpaces Operators activespaces
Apache Cassandra Operators cassandra
Cluster Topic Publisher and Subscriber Adapters cluster-pub-sub
CME iLink Order Routing Adapter cme-ilink
Diameter Client Adapters (Input, Output, Controller) DiameterAdapters
Diameter Server Adapters (Input, Output, Controller) DiameterAdapters
Apache HBase Operators hbase
Apache Kudu Operators kudu
MQTT Client Adapters (Publish, Subscribe, Ack) mqttclientconnections
OPC UA Adapters opc-ua
Python Operator python
RabbitMQ Adapters (Consumer, Producer, Ack, Nack) RabbitMQServers
Web Server Request Adapter webservers
Web Output Adapter, Web Input Adapter webstreams
Web Input Response Adapter, Web Server Request Adapter webstreams
WITS Adapter, WITS Controller Adapter WitsAdapters

For example:

adapters = {
  activespaces = {
  ...
sections

Section list. This array is optional and has no default value. For example:

sections = [
section name

A configuration for an EventFlow adapter-named section. The value does not have to be unique; that is, you can have multiple sections with the same name in the same array of sections. This object is required. For example:

name = "datagrid-definition"
settings

The object under which you add configuration settings for your adapter. All values must be strings. This object is optional and has no default value.

settings = {
  binding-strategy = "-1"
  connect-numresponses = "-1"
  connect-proxynames = ""
  connect-retries = "-1"
  connect-wait-time-seconds = "-1"
  connection-timeout-seconds = "-1"
  datagrid-id = "_default"
  datagrid-secondary-url = "http://localhost:8081"
  datagrid-url = "http://localhost:8080"
  id = "TestGrid"
  transacted-session = "false"
}

HOCON Configuration File Sample

The following shows a sample configuration in HOCON format for the Diameter adapters. For additional configuration examples, see the applicable adapter page in the Adapters Guide, or operator in the Authoring Guide, respectively.

name = "Diameter.conf"
type = "com.tibco.ep.streambase.configuration.adapter"
version = "1.0.0"
configuration = {

  // An adapter group type defines a collection of EventFlow adapter 
  // configurations, indexed by adapter type.
  AdapterGroup = {

    // A collection of EventFlow adapter configurations, indexed by adapter 
    // type. This key is required and must contain at least one configuration.
    adapters = {

      // The root section for the configuration for one EventFlow adapter.
      DiameterAdapters = {

        // Section list. This key is optional and has no default value.
        sections = [

          // A configuration for a named section for this adapter.
          {

            // Section name. The value does not have to be unique; that is, 
            // you can have·multiple sections with the same name in the same 
            // array of sections. This key·is required.
            name = "DiameterAdapter"

            // Section property bag. All values must be strings. This key is 
            // optional and has no default value.
            settings = {
              dictionary = "TestDictionary.json"
              host = ""
              id = "DiameterSectionedMessagesServer"
              originHost = "127.0.0.1"
              originRealm = "tibco.com"
              productName = "Streambase"
            }
          }

          // A configuration for a second named section for this adapter.
          {
            name = "DiameterAdapter"

            settings = {
              dictionary = "TestDictionary.json"
              host = "127.0.0.1"
              id = "DiameterSectionedMessagesClient"
              originHost = "127.0.0.1"
              originRealm = "tibco.com"
              productName = "Streambase"
            }
          }
        ]
      }
    }
  }
}