README
¶
Temporal Worker
Temporal Worker is a role for Temporal service used for hosting any components responsible for performing background processing on the Temporal cluster.
Replicator
Replicator is a background worker responsible for consuming replication tasks generated by remote Temporal clusters and pass it down to processor so they can be applied to local Temporal cluster.
It uses Kafka as the replication tasks buffer and relies on [kafka-client library] (https://github.com/temporalio/kafka-client/) for consuming messages from Kafka.
Quickstart for localhost development
- Setup Kafka by following instructions: Kafka Quickstart
- Create Kafka topic for active and standby clusters if needed. By default the development Kafka should create topics in- flight (with 1 partition). If not, then use the follow command to create topics:
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic active
and
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic standby
- Start Temporal development server for active zone:
./temporal-server --zone active start
- Start Temporal development server for standby(passive) zone:
./temporal-server --zone standby start
- Create global namespaces
tctl --ns sample namespace register --gd true --ac active --cl active standby
- Failover between zones:
Failover to standby:
tctl --ns sample namespace update --ac standby
Failback to active:
tctl --ns sample namespace update --ac active
Create replication task using CLI
Kafka CLI can be used to generate a replication task for testing purpose:
bin/kafka-console-producer.sh --broker-list localhost:9092 --topic standby
Replication task message:
{taskType: 0}
Archiver
Archiver is used to handle archival of workflow execution histories. It does this by hosting a temporal client worker and running an archival system workflow. The archival client gets used to initiate archival through signal sending. The archiver shards work across several workflows.
Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ArchiverConfig *archiver.Config
ScannerCfg *scanner.Config
ParentCloseCfg *parentclosepolicy.Config
BatcherCfg *batcher.Config
ThrottledLogRPS dynamicconfig.IntPropertyFn
PersistenceMaxQPS dynamicconfig.IntPropertyFn
PersistenceGlobalMaxQPS dynamicconfig.IntPropertyFn
EnableBatcher dynamicconfig.BoolPropertyFn
EnableParentClosePolicyWorker dynamicconfig.BoolPropertyFn
}
Config contains all the service config for worker
type Service ¶
type Service struct {
resource.Resource
// contains filtered or unexported fields
}
Service represents the temporal-worker service. This service hosts all background processing needed for temporal cluster: Replicator: Handles applying replication tasks generated by remote clusters. Archiver: Handles archival of workflow histories.
func NewService ¶
func NewService(
params *resource.BootstrapParams,
) (*Service, error)
NewService builds a new worker service
Directories
¶
Path | Synopsis |
---|---|
Package archiver is a generated GoMock package.
|
Package archiver is a generated GoMock package. |
Package parentclosepolicy is a generated GoMock package.
|
Package parentclosepolicy is a generated GoMock package. |