cuor-mission-creation-consumer v1.2.0
cuor-mission-creation-consumer
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
Dev | Prod |
---|---|
values.yaml | values.yaml |
Argo | Argo |
Rancher | Rancher |
Secrets | Secrets |
Elastic Logs | Elastic Logs |
Source Topic | Source Topic |
Avro | Avro |
Local Dependencies
- Kafka
- Kafka instance is defined in docker-compose.yml can be containerized and run by invoking
docker-compose up -d
- Kafka instance is defined in docker-compose.yml can be containerized and run by invoking
- 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