Stacksaga Scylladb Reactive Support

Overview

Configuring Scylladb as the event store for Stacksaga orchestrator applications is almost identical to configuring Stacksaga Cassandra Support as the event store, because the same dependency is used for both Scylladb and Cassandra.

If you prefer to use the Scylladb driver instead of the Cassandra driver, you can exclude the Cassandra driver dependency from spring-boot-starter-data-cassandra and include the Scylladb driver dependency in your project as shown below.

Configuring Scylladb as the Event Store

<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-cassandra-reactive-support</artifactId>
</dependency>

<!--Additional-->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-cassandra</artifactId>
    <exclusions>
        <exclusion> (1)
            <groupId>com.datastax.oss</groupId>
            <artifactId>java-driver-core</artifactId>
        </exclusion>
    </exclusions>
</dependency>

<dependency> (2)
    <groupId>com.scylladb</groupId>
    <artifactId>java-driver-core</artifactId>
    <version>4.17.0.0</version> <!-- Check for the latest version -->
</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.
1 Exclude the com.datastax.oss:java-driver-core dependency that spring-boot-starter-data-cassandra brings in by default.
2 Add the com.scylladb:java-driver-core dependency so the Scylladb driver is used instead of the Cassandra driver.
Most of the time you may use the spring-boot-starter-data-cassandra dependency in your project to configure the Cassandra connection. When you use the spring-boot-starter-data-cassandra dependency, it automatically includes the com.datastax.oss:java-driver-core dependency for Cassandra. However, since you want to use Scylladb instead of Cassandra, you need to exclude the com.datastax.oss:java-driver-core dependency from the spring-boot-starter-data-cassandra dependency to avoid conflicts and re-configure the driver for Scylladb by adding the com.scylladb:java-driver-core dependency separately.

Retry Architecture

Even though the driver is different, the retry architecture remains the same as in Cassandra. Read the Stacksaga Cassandra Support documentation for the retry architecture.