Creating the Output Adapter Map File

Create an adapter map file to configure the interface between the output adapter and Event Stream Processor.

The examples shown below map updates from RMDS to the source stream defined in the example.project.xml file.

  1. Open a new map file using an editor.
  2. Enter the following as the first line of the file to specify that the adapter map file conforms to XML version 1.0.:
    xml version="1.0" encoding="UTF-8"
  3. Add the opening and closing adapter tags by entering this as the first line:.
    <adapter>
    </adapter>
  4. Define the configuration of the adapter's interface to RMDS by adding the rfa tag, with these attributes:
    Attribute Description
    config Specify the full path name of the Reuters configuration file.
    fidFile Specify the full path name of the Reuters-supplied file that lists all of the valid FIDs.
    enumFile Specify the full path name of the Reuters-supplied file that lists each enumerated type along with the range of values it can take.
    serviceName Specify the service name provided by Reuters for the adapter to send data to RMDS.
    sessionName Specify the sessionName value found in the Reuters configuration file, rfasub.cfg.
    For example, using the files that were shipped with the adapter distribution:
    <rfa config="$ESP_REUTERS_HOME/config/rfapub.cfg"
    fidFile="$ESP_REUTERS_HOME/config/appendix_a"
    enumFile="$ESP_REUTERS_HOME/config/enumtype.def"
    serviceName="IDN_RDF" sessionName="Session1" />
  5. Add the subscriptions begin and end tags between the rfa element and the closing adapter tag.
    <subscriptions>
    </subscriptions>
    The adapter subscribes to Event Stream Processor to get the data to publish to the RMDS.
  6. Between the opening and closing subscriptions tags, add opening and closing subscription tags to define a subscription. Include these attributes in the opening subscription tag:
    Attribute Description
    name Specify a unique name for this subscription.
    flags Set this parameter to “BASE” to obtain a complete set of initial values. This may be undesirable in situations such as recovery if there are a lot of unchanging values because getting those values adds latency to the other values. In these cases, set this parameter to “NO_BASE”.
    <subscription name="subscription1" flags="BASE" >
    </subscription>
    Each subscription defined in the output adapter map file must reference at least one Event Stream Processor stream.
  7. Add the stream definition to the subscription.
    1. Immediately before the closing subscription tag, insert the opening and closing stream tags. In the opening stream tag, include the name attribute set to the name of the stream.
    2. To use a “constant” rather than a column to specify your Reuters permission code, insert the constant tag immediately before the closing stream tag, including these attributes:
      Attribute Description
      name Specify the Reuters FID “PROD_PERM.”
      value Specify the permission code issued by Reuters that certifies your permission to publish to RMDS.
    3. Immediately following the opening stream tag, insert the name tag, with the attribute column set to the column before the column with the symbol or RIC in the project. For example, if the symbol or RIC is in the first column in the project, set the value of column to 0.
    4. Immediately following the opening name tag, insert the stale tag, with the attribute column set to one less than the position of the value in the project.
    5. Between the stale and the constant tags, add a field tag for each data column in the stream that you want to send to RMDS. Include these attributes:
      Attribute Description
      column Set this parameter to either the name of the column or the numeric position (one less than the position of the value in the project).
      name Specify the Reuters FID for this data.
      For fields of datatype float, you may also include the precision attribute, set to the number of digits you want after the decimal place in the value sent to RMDS. For example:
      <stream name="stream1" >
      <name column="0"/>
      <stale column="3" />
      <field column="4" name="BID" precision="5" />
      <field column="5" name="ASK" precision="0" />
      <field column="6" name="TRDPRC_1"/>
      <field column="7" name="ACVOL_1"/>
      <constant name="PROD_PERM" value="1"/>
      </stream>