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, but
it is still supported for backward compatibility.
See StreamBase AdapterGroup
Configuration for more on the current HOCON root object, which is a member of the
HOCON type com.tibco.ep.streambase.configuration.adapter
.
The operators and adapters that previously used the 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 |
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 |
If your project used more than one of these adapters, you could 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 own 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.
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>
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.