Contents
The Spotfire Streaming Publish Adapter for TIBCO eFTL® allows a StreamBase application to publish eFTL messages.
This adapter requires access to the JAR file that implements the TIBCO eFTL Java
API on your system, and any files referenced by that JAR file. The adapter has been
tested with eFTL version 6.10.0, though it will likely work with newer FTL API
versions as well. To make the TIBCO FTL Java API available to the adapter, you must
supply a maven dependency for it. The eFTL sample comes with a launch config
tibeftl jar maven install to repo.launch
which will
install the tibeftl.jar
into your local maven
repository. Run the launch config, and respond to the prompt for both the location
of tibeftl.jar
and the version number it represents
by right clicking tibeftl jar maven install to
repo.launch
and performing the Run As command.
This section describes the properties you can set for this adapter, using the various tabs of the Properties view in StreamBase Studio.
Name: Use this required field to specify or change the name of this instance of this component. The name must be unique within the current EventFlow module. The name can contain alphanumeric characters, underscores, and escaped special characters. Special characters can be escaped as described in Identifier Naming Rules. The first character must be alphabetic or an underscore.
Operator: A read-only field that shows the formal name of the operator.
Class name: Shows the fully qualified class name that implements the functionality of this adapter. If you need to reference this class name elsewhere in your application, you can right-click this field and select Copy from the context menu to place the full class name in the system clipboard.
Start options: This field provides a link to the Cluster Aware tab, where you configure the conditions under which this adapter starts.
Enable Error Output Port: Select this checkbox to add an Error Port to this component. In the EventFlow canvas, the Error Port shows as a red output port, always the last port for the component. See Using Error Ports to learn about Error Ports.
Description: Optionally, enter text to briefly describe the purpose and function of the component. In the EventFlow Editor canvas, you can see the description by pressing Ctrl while the component's tooltip is displayed.
Property | Description |
---|---|
Connection Adapter | Optional, the TIBCO eFTL Connection Adapter to use which will supply the actual eFTL connection for this adapter to use. This field must be the full module path to the connection adapter or if the connection adapter is in the same module it can be just the adapter instance name. If this field has a value then this adapter connection fields will be disabled and the control port will not accept connect/disconnect commands, also the status port will not emit connect/disconnect messages. |
URL | The URL to connect to. |
Client Id | The client ID to set when connecting to the eFTL endpoint. A client ID is a unique identifier for each eFTL client. No two eFTL clients can connect at the same time with the same identifier. The provided identifier is optional, but for an eFTL client to receive messages that it might have missed while it was disconnected, you must specify the identifier. |
Unique Id |
If the checkbox is enabled, a random UUID is appended to the end of the
given client Id. For example, if you enter StreamBase as the Client Id with the
Unique Id enabled, the actual client Id sent to server will be similar to
StreamBase8747bcdd-a6b5-4762-bb44-4811cf86033c .
|
Authentication Key | The authentication key to use when connecting to the eFTL endpoint. |
Username | Use this property to supply a user name credential to the connect call if the user name is not specified with the URL. The server authenticates the user name and password. This field is not required if using an app authentication key. |
Output Publish Complete Status | If enabled the operator will output a status message for each successfully published message. |
Connect On Startup | If enabled, the system tries to connect to the URL endpoint on startup. |
Enable Control Port | If enabled, the control port allows you to send commands to the operator. |
Enable Status Port | If enabled a status port will be available which will emit status tuples for various events of this operator. |
Log Level | Controls the level of verbosity the adapter uses to send notifications to the console. This setting can be higher than the containing application's log level. If set lower, the system log level is used. Available values, in increasing order of verbosity, are: OFF, ERROR, WARN, INFO, DEBUG, TRACE. |
The advanced tab contains advanced connection options.
Property | Description |
---|---|
Connection Timeout | Programs use this property to supply a timeout when connecting. If the connection cannot be made to the server within this time limit (in seconds), it stops trying to connect. |
Auto Reconnect Attempts | Use this property to define the maximum number of times an attempt to autoreconnect to the server is made. |
Auto Reconnect Max Delay | Use this property to define the maximum delay between autoreconnect attempts. Following the loss of connection, the autoreconnect process delays for 1 second before attempting to autoreconnect. Subsequent attempts double this delay time, up to the maximum defined by this property. |
Notification Token | Programs use this property to supply a GCM registration token. The server uses the registration token to push notifications to a disconnected client when messages are available. |
Trust Store | The full path to the Trust Store file to use with the connection. If empty the default trust store is used. |
Trust Store Password | The password to use with the Trust Store. |
Use the settings in this tab to enable this operator or adapter for runtime start and stop conditions in a multi-node cluster. During initial development of the fragment that contains this operator or adapter, and for maximum compatibility with releases before 10.5.0, leave the Cluster start policy control in its default setting, Start with module.
Cluster awareness is an advanced topic that requires an understanding of StreamBase Runtime architecture features, including clusters, quorums, availability zones, and partitions. See Cluster Awareness Tab Settings on the Using Cluster Awareness page for instructions on configuring this tab.
Use the Concurrency tab to specify parallel regions for this instance of this component, or multiplicity options, or both. The Concurrency tab settings are described in Concurrency Options, and dispatch styles are described in Dispatch Styles.
Caution
Concurrency settings are not suitable for every application, and using these settings requires a thorough analysis of your application. For details, see Execution Order and Concurrency, which includes important guidelines for using the concurrency options.
This section describes how data is converted from a tuple into eFTL Data objects and back again.
This section describes how data is converted from eFTL Data objects into a tuple result. Note that the best data conversion option is highlighted.
If the StreamBase data type is not correct, the field will not be converted and will be left null.
Note
eFTL does current not support Boolean or int. For these data types, a best effort is done to convert from long values.
eFTL Data Type | StreamBase Field Types |
---|---|
eFTL Opaque |
|
eFTL Long |
|
eFTL Long Array |
|
eFTL Double |
|
eFTL Double Array |
|
eFTL String |
|
eFTL String Array |
|
eFTL Date |
|
eFTL Date Array |
|
eFTL Message |
|
eFTL Message Array |
|
This section describes how data is converted from a tuple into eFTL Data objects.
Note
eFTL does current not support Boolean or int. For these data types, a best effort is done to convert to long values.
StreamBase Field Type | eFTL Data Types |
---|---|
Blob | eFTL Opaque |
Boolean | eFTL Long |
list<Boolean> | eFTL Long Array |
Int | eFTL Long |
list<Int> | eFTL Long Array |
Long | eFTL Long |
list<Long> | eFTL Long Array |
Double | eFTL Double |
list<Double> | eFTL Double Array |
String | eFTL String |
list<String> | eFTL String Array |
Timestamp | eFTL Date |
list<Timestamp> | eFTL Date Array |
Tuple | eFTL Message |
list<Tuple> | eFTL Message Array |
list of list | Not supported and will result in a null field |
Function | Not supported and will result in a null field. |
Capture Field | Not supported and will result in a null field. |
Use this port to publish messages to eFTL. The entire tuple will be converted to an eFTL message.
See the Required Schema for field definitions.
Command | Description |
---|---|
Connect | Use this command to connect to the server. |
Disconnect | Use this command to disconnect from the server. |
Field | Type | Description |
---|---|---|
command | String | The command to run via the operator. |
url | String |
The optional URL to connect to. If this value is null, the default
URL from the adapter properties is used.
|
clientId | String |
The Client ID to use when connecting. If this value is null, the default
Client Id from the adapter properties is used.
|
authenticationKey | String |
The Authentication Key to use when connecting. If this value is null, the
default Authentication Key from the adapter
properties is used.
|
username | String |
The user name to use when connecting. If this value is null the default
Username from the adapters properties is used.
|
The status output port will output tuples for the current configuration, giving relevant information about the connection.
The schema for the status output port is:
Field Name | Field Type | Description |
---|---|---|
type | String |
The type of report, which follows normal log levels Debug, Error, Info, Trace, Warn .
|
action | String | Refer to the Actions column in the next table. |
object | String | An option object that was affected by this status. |
message | String | A human-readable message about the status. |
time | Timestamp | The timestamp for when the status occurred. |
The following is a list of status outputs and the object associated.
Action | object | Description |
---|---|---|
Connect | code | This type of message is output when something wrong occurred during the connect on startup. |
Connected | URL | The connect message informs that the system successfully connected to the endpoint. |
Disconnected | code | The system was properly disconnected. |
Disconnect | code | The system disconnected for the reason given in the message field. |
Reconnect | URL | The reconnect message informs that the system automatically reconnected successfully. |
Control | This type of message is output when a tuple input into the control port is not valid. | |
Publish | This type of message is output when a something is invalid with a publish of a tuple to eFTL. | |
Published |
This type of message is output when a message successfully published to eFTL.
This message is only output if you enable the Output
Publish Complete Status option.
|
When suspended, the TIBCO eFTL Publish Adapter disconnects from the server and stops processing outgoing eFTL messages.
When resumed, the adapter re-connects to the server if it was connected before being suspended, as well as resumes processing outgoing eFTL messages.