1.2.0 • Published 1 year ago

cuor-mission-creation-consumer v1.2.0

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
1 year ago

cuor-mission-creation-consumer

Config Repo cuor-mission-creation-consumer-config

cuor-mission-creation-consumer is a Kafka consumer accountable for chaining loads together under a mission.

Happy Path 1. Consumes and decodes kafka payload from {env}_io_haulynx_load_event 2. Makes GQL call to get load getLoadsServiceLoadById 3. Makes client call to Mission Management API to get RelatedLoadCreation. GET /v1/relatedLoadCreations 4. Makes GQL call to create mission createMissions 5. Makes client call to Mission Management API to complete RelatedLoadCreation PUT /v1/relatedLoadCreations/{id}

Quick Links

DevProd
values.yamlvalues.yaml
ArgoArgo
RancherRancher
SecretsSecrets
Elastic LogsElastic Logs
Source TopicSource Topic
AvroAvro

Local Dependencies

  • Kafka
    • Kafka instance is defined in docker-compose.yml can be containerized and run by invoking docker-compose up -d
  • Sync Kafka, in package.json, run..
    • sync:kafka to create the topic and avro in the local confluent-cloud. Check localhost:9021

Alternatively, spin up the loads-service locally for kafka (it's create load call publishes to io_haulynx_load_event).

Setup

Get .env file from a relevant developer. See .env.example for needed variables

Ensure your node version matches what's in the Dockerfile

node --version
nvm install 16.15.1
nvm use 16.15.1

Download dependencies

yarn install

Start service

yarn start