Contents
The TIBCO StreamBase® Subscribe Adapter for TIBCO eFTL® allows a StreamBase application to receive 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 3.3.0, though it will likely work with newer eFTL API versions as well.
To make the TIBCO eFTL Java API
available to the adapter, copy tibeftl.jar
to $STREAMBASE_HOME/lib/ext
.
Property | Description |
---|---|
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 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. |
Authentication Key | The authentication key to use when connecting to the eFTL endpoint. |
Matcher | The default matcher to use when subscribing. If the control port is not enabled this field must have a value. |
Durable Name | The durable name is a unique name given to a subscription. It is how the eFTL client receives stored messages while it is disconnected. It is also important that the eFTL client connects with the same client identifier. |
Connect On Startup | If enabled, the system tries to connect to the URL endpoint on startup. If the Matcher field is not blank, a subscription is created when the connection is established. |
Enable Control Port | If enabled, the control port allows you to send commands to the operator. |
Enable Status Port | If enabled, a status port becomes available to emit status tuples for various events of this adapter. |
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, and ALL. |
The schema lets you set up the fields that will be pulled from the eFTL messages. It is not required to provide all fields that may be in a message. The system matches fields by name and only converts data for fields specified in the schema; other fields in the eFTL message are ignored. If you subscribe to two subscriptions with different message formats, you can create a superset schema to be able to handle both subscriptions on a single adapter if required (although using separate adapters for each is a preferred method).
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. |
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. |
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. |
See the Required Schema for field definitions.
Command | Description |
---|---|
Subscribe | Use this command to create a new subscription. This command requires a value in the matcher field and optionally a value for the durableName field.
|
Unsubscribe | Use this command to unsubscribe from an existing connection. This command requires a value in the subscriptionId field.
|
Connect | Use this command to connect to the server. If the matcher and/or the durable name fields are not null (but not blank) then a new subscription is created after the connection is established. If the matcher field is null, then the default matcher is used from the adapter properties. If that value is also blank then no subscription is created after a connection is established. |
Disconnect | Use this command to disconnect from the server. |
Field | Type | Description |
---|---|---|
command | String | The command to execute 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 adapters properties is used.
|
matcher | String | The matcher to use when subscribing. If this value is null, the default Matcher from the adapter properties is used. This value is used during the connect command as well as the subscribe command. If you
do not want to subscribe directly after a connection, then pass a blank string value in for this field.
|
durableName | String | The Durable Name to use when subscribing. If this value is null, the default Durable Name from the adapters properties is used. This value is used during the connect command as well as the subscribe command. If
you do not want to subscribe directly after a connection, then pass a blank string value in for this field.
|
subscriptionId | String | The ID of the subscription to unsubscribe from. This value is used with the unsubscribe command. When a new subscription is
created, a status message is output with the subscription ID as the object field of the status port.
|
The data output port will output eFTL messages for any subscriptions as they arrive. The adapter's Schema property defines the port's schema.
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 has been affected by this status. |
Message | String | A human-readable message about the status. |
time | timestamp | The timestamp that the status occurred. |
The following is a list of status outputs and the associated objects:
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 has 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 invalid. | |
Subscribe | code | This type of message is output if this is a problem subscribing. |
Subscribed | subscriptionId | This type of message is output when a subscription is successful. The message outputs the subscriptionId as the object to track for unsubscribe calls. |
Unsubscribe | subscriptionId | This type of message is output if there is a problem unsubscribing. |
Unsubscribed | subscriptionId | This type of message is output when a subscription is successful removed. The message outputs the subscriptionId that was removed. |
When suspended, the TIBCO eFTL Subscribe Adapter disconnects from the server and stops processing incoming eFTL messages.
When resumed, the adapter re-connects to the server — if it had been connected before being suspended — and resumes processing incoming eFTL messages.