Show TOC

Example: Subscribing to and Publishing DataLocate this document in the navigation structure

Subscribe to real-time market data on two symbols and order book data on one symbol, and publish the incoming data to Event Stream Processor.

Prerequisites

A network connection to the NYSE datafeed.

The cluster database stores configuration information. Ensure that the cluster is running, so that the adapter can interact with the projects on the cluster

Procedure

  1. Set the user name and password in the example environment:
    Operating System Step
    Windows
    1. Edit the set_example_env.bat script
    2. Set the ADAPTER_EXAMPLE_USERNAME and ADAPTER_EXAMPLE_PASSWORD variables to the desired user name/password combination.
    3. If SSL is enabled, set ADAPTER_EXAMPLE_CLUSTER_NODE_PROTOCOL to esps. If it is disabled, set it to esp.
    UNIX
    1. Edit the set_example_env.sh script
    2. Set the ADAPTER_EXAMPLE_USERNAME and ADAPTER_EXAMPLE_PASSWORD variables to the desired user name/password combination.
    3. If SSL is enabled, set ADAPTER_EXAMPLE_CLUSTER_NODE_PROTOCOL to esps. If it is disabled, set it to esp.
  2. Edit the start_adapter.sh script.
  3. Set the JAVA_HOME environment variable to the directory where Java Runtime Environment (JRE) is installed.
    Note The NYSE libraries are available in both 32- and 64-bit versions. If your libraries are 32-bit, use a 32-bit JRE. If your libraries are 64-bit, use a 64-bit JRE.
  4. Start SAP Event Stream Processor.
    Operating System Step
    Windows Open a command window:
    1. Start the cluster:

      start_node.bat

    2. Add project to the cluster, and start it on the cluster:

      start_project.bat

    UNIX Open a terminal window:
    1. Start the cluster:

      ./start_node.sh

    2. Start the project on the cluster:

      ./start_project.sh

  5. Edit the mama.properties file in the adapter lib/wombat directory to ensure the subscribe_address and subscribe_port properties point to a NYSE data feed.
  6. Start the adapter.
    Operating System Step
    Windows Open a command window and enter:

    start_adapter.bat

    UNIX Open a terminal window and enter:

    ./start_adapter.sh

  7. Wait five to ten seconds for the adapter to initialize.
  8. Upload a stream record.
    Operating System Step
    UNIX ./upload.sh
    Windows upload.bat
  9. Start the subscriber utility to view data stream content.
    Operating System Step
    UNIX ./streamingsubscribe.sh
    Windows streamingsubscribe.bat