Unknown macro: {next_previous_link3}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

This section explains how to generate multiple events via databases to be analyzed via WSO2 SP.

Prerequisites

Before simulating events, a Siddhi application should be deployed.

Simulating events

To simulate multiple events from a database, follow the procedure below:

  1. Access the Stream Processor Studio via the http://localhost:<EDITOR_PORT>/editor URL. The Stream Processor Studio opens as shown below.

    The default URL is http://localhost:9090/editor

  2. Click the Event Simulator icon in the left pane of the editor.
  3. Click the Feed tab to open the Feed Simulation panel.
  4. To create a new simulation, click Create. This opens the following panel.
     
  5. Enter values for the displayed fields as follows.
    1. In the Simulation Name field, enter a name for the event simulation.
    2. In the Description field, enter a description for the event simulation.
    3. If you want to include only events that belong to a specific time interval in the simulation feed, enter the start time and the end time  in the Starting Event's Timestamp and Ending Event's Timestamp fields respectively. To select a timestamp, click the time and calendar icon next to the field.

      Then select the required date, hour, minute, second and millisecond. Click Done to select the time stamp entered. If you want to select the current time, you can click Now.
    4. If you want to restrict the event simulation feed to a specific number of events, enter the required number in the No of Events field.
    5. If you want to receive events only during a specific time interval, enter that time interval in the Time Interval field.
    6. In the Simulation Source field, select Database. Click Add New to connect to a new database, and enter information as follows:

      FieldDescription
      Siddhi App NameSelect the Siddhi Application in which the event stream for which you want to simulate events is defined.
      Stream NameSelect the event stream for which you want to simulate events. All the streams defined in the Siddhi Application you selected are available to be selected.
      Data SourceThe JDBC URL to be used to access the required database.
      Driver ClassThe driver class name of the selected database.
      UsernameThe username that must be used to access the database.
      PasswordThe password that must be used to access the database.
    7. To use the index value as the event timestamp, select the Timestamp Index option. Then enter the relevant index. If you want the vents in the CSV file to be sorted based on the timestamp, select the Yes option under CSV File is Ordered by Timestamp.
    8. To increase the timestamp of the published events, select the Timestamp Interval option. Then enter the number of milliseconds by which you want to increase the timestamp of each event.
  6. Click Save.



  • No labels