Contents
The TIBCO StreamBase® Feed Simulation Input adapter is an embedded adapter that uses Feed Simulation configuration files to define the adapter's output ports and their schemas, and to determine what data is emitted from each adapter port. Feed simulation configuration files are created with the StreamBase Feed Simulation Editor as described in Using the Feed Simulation Editor. Feed simulation configuration files can be used interchangeably with this Feed Simulation adapter and with the command line tool, sbfeedsim. Any data sources, generation methods, and emission rates can be used with either this adapter or the command line tool.
The Feed Simulation Editor uses stream names, each with a defined schema, to represent output streams. The Feed Simulation adapter creates an output port for each stream in the configuration file, using the defined schema as the output schema.
The first output port of the adapter is always a status port. Each subsequent output port of the adapter represents a stream defined in the feed simulation configuration file, in the order in which they appear in the Editor.
An optional control input port is available for pausing and resuming, as defined below.
The Feed Simulation input adapter has the following properties on the General tab in its Properties View in StreamBase Studio:
Name: Use this required field to specify or change the name of this instance of this component, which must be unique in the current EventFlow module. The name must contain only alphabetic characters, numbers, and underscores, and no hyphens or other special characters. The first character must be alphabetic or an underscore.
Adapter: A read-only field that shows the formal name of the adapter.
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 check box 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 component's purpose and function. In the EventFlow Editor canvas, you can see the description by pressing Ctrl while the component's tooltip is displayed.
The Feed Simulation adapter has the following properties on the Adapter Settings tab in its Properties View in StreamBase Studio:
Property | Data Type | Description |
---|---|---|
Feed Simulation File | string | The name of the feed simulation configuration file to use, which must be present on the resource search path. The number of output ports and their schemas are defined in this file. |
Enable Control Port | check box | If selected, this setting adds an input port to the adapter with the schema and meanings defined below. |
Report Period | integer value | Specifies the number of seconds to elapse before emitting a control tuple that contains the number of data tuples sent since the last control tuple. Zero means never report. |
Wait for Start Command | check box | If selected, the simulation does not start until a start command is received on the control port.
|
File Name Field | string | The name in the input schema that specifies the file to load. If empty this feature is disabled. |
Log Level | INFO | Controls the level of verbosity the adapter uses to issue informational traces to the console. This setting is independent of the containing application's overall log level. Available values, in increasing order of verbosity, are: OFF, ERROR, WARN, INFO, DEBUG, TRACE. |
Use the settings in this tab to allow this operator or adapter to start and stop based on conditions that occur at runtime in a cluster with more than one node. During initial development of the fragment that contains this operator or adapter, and for maximum compatibility with TIBCO Streaming 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.
The Feed Simulation input adapter always has a status output port, which is always the first output port. Subsequent output ports are added for each data stream defined in the feed simulation configuration file. The number of data stream output ports, and their schemas, are completely determined by the supplied feed simulation configuration file.
The schema of the status output port is defined as follows:
Field | Data Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Type | string | The basic state reported, always one of the following:
|
||||||||
Object | string | The name on the EventFlow canvas of the adapter reporting the status. | ||||||||
Action | string | The action that occurred, one of the following:
The LASTNUMTUPLES action contains the number of data tuples emitted for the most recent Report Period. |
||||||||
Message | string | A human-readable string that provides additional context for the status message. | ||||||||
Time | timestamp | The time the action occurred. |
By default, the Feed Simulation input adapter has no input ports. You can optionally add a control port by checking the Enable Control Port property.
The schema of the control input port is defined as follows:
Field | Data Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
command | string | The basic state reported, always one of the following, which are not case sensitive:
|
||||||||
value or scale | double | Only used with the scale , maxtuples , and maxtime commands.
For |
||||||||
filename | string | Only used with the load command.
This value determines the new feed simulation file to load. |
Typechecking fails if the feed simulation configuration file cannot be found, or if referenced resources such as CSV files cannot be found.
On suspend, the Feed Simulation input adapter finishes processing the current simulation window (10 ms by default), and then pauses.