Show TOC

Example: Using File Connectors With Batch PublishingLocate this document in the navigation structure

Use file connectors to read Quote messages from a file, and publish them to SAP Event Stream Processor. The adapter uses the FIX ABFIX44.xml dictionary file, which is used for this example only.

Prerequisites

Set the value of the maxPubPoolSize parameter to 2000 to enable batch publishing (also referred to as record pooling or block publishing).

Create a cluster database and deploy a cluster to it. See the SAP Event Stream Processor: Configuration and Administration Guide for more information.

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. 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

  3. Start the respective subscriber utility for SAP Event Stream Processor.
    Operating System Step
    UNIX Open a terminal window and enter:

    ./streamingsubscribe.sh

    Windows Open a command window and enter:

    streamingsubscribe.bat

  4. 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

  5. Wait five to ten seconds for the adapter to initialize.
    • There are a total of 10096 records in the 8kmsg.fix file. The FIX adapter reads these records and publishes them to the ESP server in batches of 2000.
    • After 10000 records are published, the adapter waits five seconds, then publishes the remaining 96 records.