StackSaga Mysql-Agent Configuration Properties

Stacksaga MYSQL agent does support both eureka based and kubernetes based environments. There is a list of common configuration properties for both and as well as there are some configuration properties specific to eureka and kubernetes.

Common Configuration Properties

Property Name Default Value Type Description

spring.profiles.active

-

String

There are two profiles available as eureka and k8s. You can choose one of them based on the deployment environment.

spring.application.name

-

String

The name of the agent application.

server.port

8080

int

The port of the agent service.

NOTE: Due to Agent service internally uses default {data_source} for managing connection, It can be configured the datasource properties in the same way that spring boot provides.
The prefix is {data_source_prefix}.

stacksaga.agent.target-service

-

String

The name of the target service. (The transactions are fetched based on this name from the event-store)

stacksaga.agent.target-service-host

-

String

The host name of the target service that retry tasks should be submitted to.

Thread-Pool of Parallel Processing: Agent service uses a thread-pool to process the retry tasks in parallel. Each thread is responsible for processing one or more partitions (virtual nodes).

stacksaga.agent.local-partition-count

Runtime.getRuntime().availableProcessors()

int

how many local partitions (virtual nodes) should be created to process the retry in parallel. by default, it is set to the number of available processors. the entire token range is divided into these partitions, and each partition is assigned to one thread.

stacksaga.agent.buffer-size

1000

int

how many records should be fetched in one batch from the event-store when retrying the failed transactions.

stacksaga.agent.retry.delay-in-minutes

2

int

how often the retry task should be executed. every 2 minutes triggers the retry task based on UTC time.

stacksaga.agent.internal-communication.retry-delay

Duration

1s

the delay between each retry attempt for internal service communication failures.

stacksaga.agent.internal-communication.max-retry-attempts

3

int

the maximum number of retry attempts for internal service communication failures.

Eureka profile’s Configuration Properties

If you are in the Eureka environment, then you have to configure the following configuration properties.

Property Name

Default Value

Type

Property Description

stacksaga.agent.eureka.instance-type

-

InstanceType[master,slave]

The type of this agent. Whether this agent is master or slave. in the cluster, it should have at least one master node.

stacksaga.agent.eureka.slave.master-instance-id

-

String

If the instance is a slave instance, the instance id of the master instance that this slave should connect to. if master instance also works as a slave, the master instance id should be provided.

NOTE: In addition to the target eureka service details, The following meta-data should be added in the eureka.instance.metadata-map section.

eureka.instance.metadata-map.stacksagaRegion

-

String

The region that the application is deployed.

eureka.instance.metadata-map.stacksagaZone

-

String

The zone that the application is deployed.

Kubernetes profile’s Configuration Properties

If you are in the kubernetes environment, then you have to configure the following configuration properties.

Property Name

Default Value

Type

Description

stacksaga.agent.k8s.zone-topology-name

topology.kubernetes.io/zone

String

the topology name of the zone in the kubernetes cluster.

stacksaga.agent.k8s.region-topology-name

topology.kubernetes.io/region

String

the topology name of the region in the kubernetes cluster.

stacksaga.agent.k8s.namespace

default

String

the namespace that the application is deployed in the kubernetes cluster.

stacksaga.agent.k8s.service-host

-

String

the service host name of the agent service.