cuor-mission-creation-consumer
v1.2.0
Published
Consumer to create missions for chaining loads
Readme
cuor-mission-creation-consumer
cuor-mission-creation-consumer is a Kafka consumer accountable for chaining loads together under a mission.
Happy Path
- Consumes and decodes kafka payload from
{env}_io_haulynx_load_event - Makes GQL call to get load
getLoadsServiceLoadById - Makes client call to Mission Management API to get RelatedLoadCreation.
GET /v1/relatedLoadCreations - Makes GQL call to create mission
createMissions - 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:kafkato 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.1Download dependencies
yarn installStart service
yarn start