Adapter Configuration Files

Overview

Most StreamBase adapters are configured with settings made in the Properties view of their components on the canvas. However, a small set of operators and adapters have more complex requirements.

This set of operators and adapters use a single file in XML format that must be named adapter-configurations.xml and must reside in the project's src/main/resources folder.

The operators and adapters that must use this XML format are:

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
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

If your project uses more than one of these adapters, you can combine their configuration settings in the same adapter-configurations.xml file, each with its own <adapter-configuration> element. Notice that the file name uses the plural configurations, while individual adapters use the singular form, adapter-configuration. For example:

<adapter-configurations>
    <adapter-configuration name="python">
     ...
    <adapter-configuration>
    <adapter-configuration name="webservers">
     ...
    <adapter-configuration>
</adapter-configurations>

The name= strings shown in the Required Identifier String column are hard-coded identifiers for each adapter type. Having a known string allows each adapter to parse the adapter-configurations.xml file separately to identify its set of configuration elements.

Adapter-specific elements allowed in the section for individual adapters and operators are described in the Adapters Guide or Authoring Guide page for that adapter or operator.

Examples

The following example configures a Python operator to have an instance name pythonic for use with Python Instance operators.

<adapter-configurations>
  <adapter-configuration name="python">
    <section name="python">
      <setting name="instance" val="pythonic"/>
      <setting name="executable" val="C:/Python27/python.exe"/>   
      <setting name="useTempFile" val="false"/>
      <setting name="captureOutput" val="false"/>
      <setting name="workingDir" val="."/>
      <section name="envVariables">
        <setting name="CUDA_VISIBLE_DEVICES" val="0,1"/>
      </section>
      <section name="arguments">
        <setting val="-u"/>
      </section>
    </section>
  </adapter-configuration>
</adapter-configurations>

The next example configures an Apache Kudu Operator.

<adapter-configurations>
  <adapter-configuration name="kudu">
    <section name="master-definition">    
      <!-- This name identifies this master definition and will appear 
           in the 'Kudu Master Definition' operator property drop-down -->
      <setting name="id" val="Test Cluster"/>
      <!-- Edit these values to reflect your own Kudu cluster -->
      <setting name="hosts" val="kuduserver1:7051;kuduserver2:7051"/>
      <setting name="bossCount" val="0"/>
      <setting name="workerCount" val="0"/>
      <setting name="disableStatistics" val="false"/>
    </section>
    <section>
      <!-- Other cluster definitions go here -->
    </section>
  </adapter-configuration>
</adapter-configurations> 

Legacy JMS Configuration

In StreamBase releases before 10.3.0, the JMS and TIBCO EMS Adapters were configured with adapter-configurations.xml files. Starting with 10.3.0, the JMS-EMS configuration is stored in a HOCON configuration file of type com.tibco.ep.streambase.configuration.adapter with root object JMSAdapter.

Remember that JMS and EMS configuration is edited with the JMS Configuration Editor in StreamBase Studio, which silently stores the configuration in the appropriate file type. Starting with StreamBase 10.3.0, if the JMS Editor encounters a JMS configuration in an adapter-configurations.xml file, it silently converts it to HOCON format and then comments out the name="jms" section of the adapter-configurations.xml file.