All docs This doc

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • One or more Siddhi Applications must be running in the WSO2 SP server. For more information, see Deploying and Running a Siddhi Application.
  • A working RDBMS instance that can be used for data persistence must exist.
  • The requirements of the datasource must be already defined.
  • Database persistence involves updating the databases connected to WSO2 Steam Processor with the latest information relating to the events that are being processed by WSO2 SP at a given time.

...

ParameterPurposeRequired Value
enabledThis enables data persistence.true
intervalInMin
The time interval in minutes that defines the interval in which state of Siddhi applications should be persisted1
revisionsToKeepThe number of revisions to keep in the system. When a new persist takes place, the old revisions are removed.3
classpersistenceStore
The persistence class store.org.wso2.carbon.stream.processor.core.persistence.DBPersistenceStore
config > datasourceThe datasource to be used in persisting the state. The provided datasource should be properly defined in the deployment.yaml. For detailed instructions of how to configure a datasource, see Configuring Datasources.
WSO2_PERSISTENCE_DB (Datasource with this name should be defined in wso2.datasources)
config > tableThe table that should be created and used for the persisting of the state.
PERSISTENCE_TABLE

Given below The following is a sample segment of the configurations of the required configurations in the <SP_HOME>/conf/worker/deployment.yaml neccassary to  file to configure database file system persistence.

Code Block
languagexml
titleSample deployment.yaml segment
state.persistence:
  enabled: true
  intervalInMin: 1
  revisionsToKeep: 3
  classpersistenceStore: org.wso2.carbon.stream.processor.core.persistence.DBPersistenceStore
  config:
    datasource: <DATASOURCE NAME>   # A datasource with this name should be defined in wso2.datasources namespace
    table: <TABLE NAME>

...

ParameterPurposeRequired Value
enabledThis enables data persistence.true
intervalInMin The time interval in minutes that defines the interval in which state of Siddhi applications should be persisted
1
revisionsToKeepThe number of revisions to keep in the system. When a new persist takes place, the old revisions are removed.3
classpersistenceStore
The persistence classstore.
org.wso2.carbon.stream.processor.core.persistence.FileSystemPersistenceStore
config > locationA fully qualified folder location to where the revision files should be persisted.
siddhi-app-persistence


Given below The following is a sample segment of the configurations of the required configurations in the <SP_HOME>/conf/worker/deployment.yaml neccassary to  file to configure file system persistence.

Code Block
themeConfluence
titleSample deployment.yaml segment
state.persistence:
  enabled: true
  intervalInMin: 1
  revisionsToKeep: 2
  classpersistenceStore: org.wso2.carbon.stream.processor.core.persistence.FileSystemPersistenceStore
  config:
    location: siddhi-app-persistence