Skip to main content
Version: 2.1.0

Backend

Pre-requisites

Required Services

  • postgres (live db)
  • postgres (replay db)
  • postgres (processing db)
  • nats (jetstream enable)
  • minio (store db snapshot)
  • Debezium (nats connector)
note

Debezium should be configured to capture change data event on postgres (live db). Refer to this document for how to configure debezium with nats or can deploy debezium by this deployment

Running Locally

  1. Clone the repository:
git clone https://github.com/mssfoobar/rnr.git
  1. Each module have their own { service_name }.env.sample file. Copy and remove the .sample in repository root directory. Provide the necessary variables inside the .env file.

  2. Start services by go command

go run cmd/replay-manager/main.go
go run cmd/db-operator/main.go
go run cmd/msg-operator/main.go
go run cmd/transform-message/main.go
go run cmd/schedulejob/main.go
info

TransformMsg need a migration before running service by executing all sql file in /pkg/transformmsg/db/schema

Running with Docker

The Docker Compose file to start up Record and Replay module can be found under rnr directory in dev-containers repository. For more information on dev-containers, please refer to Local Development.

To run Record and Replay module, navigate to the dev-containers directory in your local machine and execute the following:

docker compose --env-file .env -f rnr/compose.yml up -d