stacksaga-Kafka-starter
stacksaga-Kafka-starter
is the core dependency of the Stacksaga-Kafka Framework. it provides the essential functionalities and specifications to create and manage sagas using Kafka as the messaging backbone and ot works as Saga Execution coordinator(SEC). the dependency can be added to your Spring Boot application (the target orchestrator service) as follows,
It has been built internally using reactive programming principles, ensuring high scalability and performance. Even though the framework operates reactively under the hood, it fully supports both reactive and non-reactive (imperative) application models. |
<dependency>
<groupId>org.stacksaga</groupId>
<artifactId>stacksaga-kafka-starter</artifactId>
<version>${latest-version}</version>
</dependency>
Make sure to add the one of database-support modules as well to enable event sourcing capabilities. because stacksaga-Kafka-starter only provides the core saga orchestration functionalities. the event sourcing capabilities are handled by the stacksaga-database-support module. you can find more details about the database-support modules in here.
|
stacksaga-Kafka-starter comes with the stacksaga-kafka-client dependency transitively. so you don’t have to add the stacksaga-kafka-client dependency separately to your target services.
|
What does stacksaga-kafka-starter
do?
In high-level,
After adding the stacksaga-kafka-starter
dependency to your Spring Boot application, it automatically configures the necessary beans and components required for saga orchestration using Kafka. and you can provide configure your saga workflows accordingly the stacksaga-kafka specifications. once the transaction is initiated, the starter module(SEC) takes care of managing the saga’s lifecycle, coordinating between different microservices, and ensuring that all steps are executed in the correct order. it also handles failures by triggering compensating actions as configured. while each execution it manages the state of the transaction and persists events to the configured event store for future-retrying, and traceability.
See the stacksaga framework architecture section to get more details about how the stacksaga-kafka-starter
works in the overall architecture.
Related Topics
The following topics are discussed in-detailed regarding the functionalities and specifications provided by the stacksaga-kafka-starter
module.
-
SEC (Saga Execution Coordinator) The starter module implements the SEC engine, orchestrating the saga lifecycle, managing state transitions, and coordinating microservices. See: SagaKafkaTemplate ReactiveSagaKafkaTemplate
-
Specifications Related Topics
The starter module includes specifications for defining saga steps, compensation actions, and event handling mechanisms. These specifications provide a structured way to implement sagas in your application. -
Configuration Properties