Stacksaga Oracle Reactive Support
Overview
stacksaga-oracle-reactive-support is the Oracle reactive (non-blocking) implementation of the Stacksaga Event Store.
It provides all the necessary facilities for accessing an Oracle Database as the event-store for the Stacksaga engine, and also provides the endpoints for accessing the event-store to see the tracing details from the StackSaga Trace-Window.
| read Stacksaga Event Store to have a better understanding of the database support modules like the responsibilities, architecture etc. |
Adding stacksaga-oracle-reactive-support as a dependency
Here is the way that you can add the library into your existing orchestrator application as a dependency.
stacksaga-oracle-reactive-support as a dependency<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.stacksaga</groupId>
<artifactId>stacksaga-bom</artifactId>
<version>1.0.0-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependency>
<groupId>org.stacksaga</groupId>
<artifactId>stacksaga-oracle-reactive-support</artifactId>
</dependency>
| It is recommended to StackSaga Initializer to get the dependency snippets for your project for the StackSaga related dependencies, as it will ensure you have the correct versions and configurations for your project setup. |
The Oracle R2DBC driver (com.oracle.database.r2dbc:oracle-r2dbc) is pulled in transitively by stacksaga-oracle-reactive-support, verified against Oracle Database 18c, 19c, 21c and 23c.
|
Configuration Properties
The connection, connection-pool, and transaction retry/restore/streaming properties below are bound by a dialect-neutral configuration class shared across every stacksaga--reactive-support SQL module — MySQL, Oracle, PostgreSQL, and any other SQL dialect added in the future. This is why the property prefix below is stacksaga.datasource. rather than being named after any single database, and why transaction tuning is bound under stacksaga.mysql.transaction.* even when the module in use is not MySQL — the retry engine itself lives in a vendor-neutral runtime module and is not duplicated per dialect.
Setting either of these prefixes configures the behaviour for whichever SQL database support module you have added.
| Property Name | Default Value | Type | Description |
|---|---|---|---|
|
|
|
Enable or disable the starter entirely. Defaults to true so it activates automatically when added. |
The following |
|||
|
|
|
The R2DBC connection URL used by the event-store, e.g. |
|
|
|
The database server host for the reactive event-store connection. |
|
|
|
The database server port for the reactive event-store connection. Override this for non-MySQL dialects (e.g. |
|
|
|
The database/service name used by the event-store via R2DBC. |
|
|
|
The username for the event-store’s R2DBC connection. |
|
|
|
The password for the event-store’s R2DBC connection. |
|
|
|
The maximum time to wait while establishing an event-store connection to the database server. |
|
|
|
Additional R2DBC driver-specific connection options for the event-store, as key-value pairs. |
|
|
|
The number of connections to create in the event-store’s connection pool on startup. |
|
|
|
The maximum number of connections allowed in the event-store’s connection pool. |
|
|
|
The maximum time a connection may remain idle in the event-store’s pool before being closed. |
|
|
|
The maximum lifetime of a connection in the event-store’s pool before it is closed and replaced. |
|
|
|
The maximum time to wait when acquiring a connection from the event-store’s pool before failing. |
|
|
|
The query used to validate an event-store connection before it is handed out from the pool. |
The following |
|||
|
|
|
How long a transaction stays live. After this period it is no longer exposed for retry even if it is still in a processing state. |
|
|
|
How long a transaction is kept waiting before it is next exposed for retrying, to avoid retrying a transaction too frequently in a short period of time. |
|
|
|
How long a transaction may go without being updated before it is considered crashed (e.g. due to an application crash) and is restored and exposed for retrying. |
|
|
|
How many transactions are fetched from the database at once into the in-memory buffer (Reactor |
|
|
|
The buffered-transaction count at which the next database fetch is triggered to refill the buffer (Reactor |
|
|
|
How many transactions are processed simultaneously in the recovery pipeline (Reactor |
|
|
|
How many transactions are pre-fetched and buffered before processing begins (Reactor |
Schema creation
Unlike some other stores, Oracle schema objects for the event-store are not created through a migration tool such as Liquibase or Flyway. The Oracle module ships its own idempotent schema.sql script, which is executed automatically against the configured connection at application startup.
Every statement in the script is wrapped so it is safe to run against a database where the objects already exist — re-running it (for example, on every application restart) is a no-op if the schema is already up to date, and requires no manual migration step or version tracking table.
For the full data-type mapping decisions, the schema-idempotency mechanism, and other Oracle-specific implementation notes, see the README.adoc inside the stacksaga-oracle-reactive-support-impl module of the StackSaga source repository.
|