Spaces:
Runtime error
Runtime error
metadata
title: Cuatrolabs Sync Worker Ms
emoji: 🐢
colorFrom: blue
colorTo: green
sdk: docker
pinned: false
SCM Sync Worker Microservice
Dedicated worker service for processing MongoDB → PostgreSQL sync operations.
Architecture
SCM-MS → Redis Queue → Sync-Worker-MS → PostgreSQL
Features
- Processes sync operations from Redis queues
- Independent scaling from SCM API
- Persistent queue (survives restarts)
- Retry logic with exponential backoff
- Monitoring and metrics
Queues Processed
sync:queue:catalogues(5 workers)sync:queue:employee(3 workers)sync:queue:merchants(5 workers)sync:queue:warehouses(3 workers)sync:queue:uom(2 workers)
Deployment
# Build
docker build -t ghcr.io/mkkbms/sync-worker-ms:latest .
# Deploy
kubectl apply -f deployment.yaml
Environment Variables
MONGODB_URI- MongoDB connection stringMONGODB_DB_NAME- MongoDB database namePOSTGRES_*- PostgreSQL connection detailsREDIS_*- Redis connection details
Scaling
Scale workers independently:
kubectl scale deployment/sync-worker-ms --replicas=5 -n apps