Example: Subscribing to and Publishing Data

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.
Task
  1. Edit the adapter.sh script.
  2. 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.
  3. Start Event Stream Processor.
    Operating System Step
    UNIX Open a terminal window:
    1. Start the example cluster:

      start_server_cluster.sh

    2. Start the project on the cluster:

      start_project.sh

    Windows Open a command window:
    1. Start the example cluster:

      start_server_cluster.bat

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

      start_project.bat

  4. 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.
  5. Start the adapter.
    Operating System Step
    UNIX Open a terminal window and enter:

    ./adapter.sh

    Windows Open a command window and enter:

    adapter.bat

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