Contents
The TIBCO StreamBase® Adapter for Morningstar Quotes Feed allows a StreamBase application to receive market data from Morningstar servers. Both Interactive and broadcast feeds are supported. The types of data delivered depend on how the Morningstar adapter is configured, in combination with what services the Morningstar server has enabled for your account.
This section describes the properties you can set for this adapter, using the various tabs of the Properties view for the adapter's icon 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.
This section describes the properties on the Adapter Properties tab in the Properties view for the Morningstar Quotes Feed adapter.
Property | Description |
---|---|
Morningstar Server Name and Port Number |
A semicolon-separated list of Morningstar Quotes Feed servers in the form
ServerName:PortNumber
|
Connect on startup | Determines if a connection to the Morningstar server should be made as soon at the adapter starts. |
User Name | Your Morningstar account user name. |
Password | Your Morningstar account password. |
Feed Type |
Select which type of Quotes Feed you wish to use. Must be either
Interactive or Broadcast .
|
Field Dictionary | Optionally supply a path to a customized dictionary file that maps field IDs to field names. See below for description of this dictionary. |
Enable Admin Messages | Select if you wish to receive Admin Messages. An output port is created for this message type. |
Enable Trade Messages | Select if you wish to receive Trade Messages. An output port is created for this message type. |
Enable Quote Messages | Select if you wish to receive Quote Messages. An output port is created for this message type. |
Enable Recap Messages | Select if you wish to receive Recap Messages. An output port is created for this message type. |
Enable Close Messages | Select if you wish to receive Close Messages. An output port is created for this message type. |
Enable Static Messages | Select if you wish to receive Static Messages. An output port is created for this message type. |
Enable News Messages | Select if you wish to receive News Messages. An output port is created for this message type. |
Enable Chart Messages | Select if you wish to receive Chart Messages. An output port is created for this message type. |
Skip Missing Fields | If selected, do not emit a warning for fields present in an incoming message with no corresponding StreamBase field. If not selected warning messages will only appear once for each missing field. |
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. |
This section describes the properties on the Adapter Properties tab in the Properties view for the Morningstar Quotes Feed adapter.
Property | Description |
---|---|
Reconnect Interval | When a connection fails, the number of seconds to wait before trying to reconnect. |
Use Compression | Request the Morningstar server to use data compression. |
Receive Buffer Size | The size in bytes of the buffer used to receive data, Set to 64K or better for optimal performance |
Send Buffer Size | The size in bytes of the buffer used to send data. |
Use the Edit Schemas tab to specify the schema for message types selected on the Adapters Properties tab. See Using the Adapter section below for information on field names to use.
For general instructions on using the Edit Schemas tab, see Defining Input Streams.
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 StreamBase Morningstar Quotes Feed adapter can be configured to emit eight different data message types. The Morningstar account configuration determines which data message types, markets, and security types are available from the Morningstar server.
As with other StreamBase adapters and operators, you can optionally enable an Error Output Port, as described in Using Error Ports and Error Streams.
All Morningstar data messages are composed of a small header and a variable number of field ID-data type-value triplets. A Field Dictionary is used to map a Morningstar Field ID to a StreamBase field name.
A Morningstar data message header has four fields that are common across all data messages. These fields are:
-
SecurityType
-
ExchangeId
-
MarketCenter
-
Symbol
Unlike all other Morningstar fields, these field names are not configurable via the field dictionary.
For message types that are selected, Morningstar field IDs that appear in Morningstar messages and do not have a corresponding StreamBase field name defined cause a warning to be emitted by StreamBase Server. This warning can be disabled by selecting the Skip Missing Fields option.
Field names defined in a StreamBase message type schema that do not appear in a Morningstar message are set to null. Since individual Morningstar messages within a single message type can have a varying number of fields, it is not uncommon to have StreamBase tuples with a varying number of null fields.
All Morningstar data messages are composed of a variable number of field ID-data
type-value triplets. Morningstar field IDs are integer values. An optionally
configurable field dictionary is used to map a Morningstar field ID integer to a
StreamBase field name. A default field dictionary is included with the StreamBase
adapter and is used if a custom dictionary is not specified. The default
Morningstar field ID to StreamBase field name mapping can be seen in the file
MSFieldDictionary.csv
delivered as part of the
Morningstar sample application.
Some field IDs are common across many message types, while other field IDs are unique to individual message types, security types, and so on. You must consult Morningstar documentation to determine the field IDs provided by various message types, and what fields are of particular interest.
An individual field ID always corresponds to a particular StreamBase field name. As Morningstar messages are parsed, their field IDs are looked up in the field ID dictionary to yield a StreamBase field name. The resulting StreamBase field name is used to set the field in the output tuple with the value parsed out of the Morningstar Field ID-value pair.
Morningstar value data types are represented by one of four StreamBase data types:
StreamBase Data Type | Morningstar Data Type | Morningstar Unsupported Data Type |
---|---|---|
String | All Morningstar data types can be coerced into a string, a binary data type will be converted to a Hex value string. | None |
Integer |
Long, *Unsigned Long, *Fractional Double, *Long Fractional Double, *Signed 64 bit Integer, *Unsigned 64 bit Integer, *Double, *Julian, *Snapper Time, Long Pointer To String, String NoteValues denoted with * may incur data loss converting to an integer |
Binary |
Long |
Long, Unsigned Long, Fractional Double, Long Fractional Double, Signed 64 bit Integer, Unsigned 64 bit Integer, Double, Julian, Snapper Time, Long Pointer To String, String |
Binary |
Double |
Long, Unsigned Long, Fractional Double, Long Fractional Double, Signed 64 bit Integer, Unsigned 64 bit Integer, Double, Julian, Snapper Time, Long Pointer To String, String |
Binary |
Trying to set a Morningstar data type to an incompatible StreamBase data type results in a warning message at runtime.
The Morningstar Quote Feed adapter has one command input port. The schema for this port has the following fields:
-
command (string). Specifies the command to send to the Quotes Server. The supported commands are:
-
Connect — Connect to the Morningstar servers. Only valid if currently disconnected.
-
Disconnect — Disconnect from the Morningstar servers. Only valid if currently connected.
-
SendCommand — only valid for the Interactive Feed type.
-
SetFlag
-
-
parameter (string). Any parameters needed by the command sent.
-
For the SendCommand command, this parameter can be any valid Quote Server command. For example:
"MarketRequest /mkt=130 /ActReal"
-
For the SetFlag command, this parameter specifies the message or field to be enabled or disabled. For SetFlag, the parameter strings must be one of:
Market News Message Security Field
-
-
Parameter for the SetFlag command, ignored for SendCommand (int). This parameter is the field ID that is to be set.
-
Parameter for the SetFlag command, ignored for SendCommand (int). This parameter is either
0
to disable or1
to enable.
The StreamBase Morningstar Quotes Feed adapter has one output status port, plus a configurable number of data message ports.
The Morningstar Quotes Feed adapter has an optional Admin output port plus one or more data message output ports. The schema for these ports are defined in the Edit Schemas tab in the adapter's Properties view. The field names you specify must be present in the field dictionary currently being used.
The seven data message ports have four fields derived from the data header, and have fixed field names. These are: Symbol, SecurityType, ExchangeId, MarketCenter.
The status output port will output tuples giving relevant information.
The schema for the status output port is:
Field Name | Field Type | Description |
---|---|---|
Status | String | A string describing the current status of the adapter. |
Time | timestamp | The timestamp that the status occurred. |
Info | list(tuple) | A list of name value pairs of data to give more context to the status. |
The following is a list of status outputs and the associated objects:
Status | Info Elements |
---|---|
Command Error |
|
Read Error |
|
Send Error |
|
Process Packet Error |
|
Connection Error |
|
Close Connection Error |
|
Connecting |
|
Connected |
|
Connection Closed | No Values |
Connection Retry |
|
Command Reply Packet |
|
Admin Packet |
|
Command Packet |
|
Function Packet |
|
Keep Alive Packet |
|
Add an instance of the adapter to a new StreamBase EventFlow application as follows:
-
In StreamBase Studio, create a project, including an empty StreamBase EventFlow Application file to host the adapter.
-
From the Operators and Adapters drawer of the Palette view, drag the Output Adapter icon to the palette. This opens the Insert Output Adapter dialog.
-
In the search field, type a string such as
morning
to narrow the list of adapters. When found, select the icon for the Morningstar Feed adapter, then click . -
Double-click the adapter icon and select the Adapter Properties tab in the Properties view. You must provide the Morningstar host name, port number, and your account name and password. You must also select which message types you are interested in.
-
Select the Edit Schemas tab. For each message type selected, you must provide a schema for the output port. If you are using the default field dictionary, refer to sample file
MSFieldDictionary.csv
in the Morningstar sample for the list of acceptable field names.
The StreamBase Morningstar Quotes Feed adapter uses typecheck messages to help you configure the adapter.
The adapter generates warning messages at runtime under various conditions, including:
-
A field in the output port schema is not present in the field dictionary.
-
The data type of a Morningstar field can not be coerced into the corresponding StreamBase field data type.
When suspended, the adapter continues to receive and process Morningstar messages, but no longer emits tuples on its primary output port.
When resumed, the adapter once again starts emitting tuples on its primary output port.