Skip to content

Commit

Permalink
feat(mojaloop/#3689): fx quotes pov implementation (#326)
Browse files Browse the repository at this point in the history
  • Loading branch information
oderayi authored Mar 8, 2024
1 parent 43943aa commit 9bf52f0
Show file tree
Hide file tree
Showing 26 changed files with 2,217 additions and 109 deletions.
5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,8 @@ workflows:
- setup
filters:
tags:
only: /.*/
ignore:
- /v[0-9]+(\.[0-9]+)*\-snapshot+((\.[0-9]+)?)/
branches:
ignore:
- /feature*/
Expand Down Expand Up @@ -877,7 +878,7 @@ workflows:
- pr-tools/pr-title-check
- test-lint
- test-unit
- test-coverage
# - test-coverage
# - test-integration
# - test-functional
- vulnerability-check
Expand Down
3 changes: 2 additions & 1 deletion .ncurc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
reject: [
"json-rules-engine",
"eslint",
"@mojaloop/sdk-standard-components" # Version 17.4.0 introduced the bug: this.logger.isDebugEnabled is not a function
"@mojaloop/sdk-standard-components", # Version 17.4.0 introduced the bug: this.logger.isDebugEnabled is not a function
"@mojaloop/central-services-shared" # This should be removed as soon as all vlaidations on the fx feature has been completed and cs-shared fx feature merged to masin
]
35 changes: 14 additions & 21 deletions audit-ci.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,19 @@
// Only use one of ["low": true, "moderate": true, "high": true, "critical": true]
"moderate": true,
"allowlist": [
"GHSA-v88g-cgmw-v5xw",
"GHSA-phwq-j96m-2c2q",
"GHSA-pfrx-2q88-qq97",
"GHSA-282f-qqgm-c34q",
"GHSA-8cf7-32gw-wr33",
"GHSA-hjrf-2m68-5959",
"GHSA-qwph-4952-7xr6",
"GHSA-4jv9-3563-23j3",
"GHSA-6vfc-qv3f-vr6c",
"GHSA-wc69-rhjr-hc9g",
"GHSA-vp56-6g26-6827",
"GHSA-g954-5hwp-pp24",
"GHSA-h755-8qp9-cq85",
"GHSA-mjxr-4v3x-q3m4",
"GHSA-rjqq-98f6-6j3r",
"GHSA-qgmg-gppg-76g5",
"GHSA-f9xv-q969-pqx4",
"GHSA-p9pc-299p-vxgp",
"GHSA-7fh5-64p2-3v2j", // https://github.com/advisories/GHSA-7fh5-64p2-3v2j
"GHSA-c429-5p7v-vgjp", // https://github.com/advisories/GHSA-c429-5p7v-vgjp
"GHSA-78xj-cgh5-2h22" // https://github.com/advisories/GHSA-78xj-cgh5-2h22
"GHSA-v88g-cgmw-v5xw", // widdershins>swagger2openapi>oas-validator>ajv
"GHSA-phwq-j96m-2c2q", // @mojaloop/central-services-shared>shins>ejs
"GHSA-c429-5p7v-vgjp", // good-console>hoek
"GHSA-c429-5p7v-vgjp", // good-squeeze>hoek
"GHSA-c429-5p7v-vgjp", // joi>hoek>
"GHSA-c429-5p7v-vgjp", // topo>hoek>
"GHSA-282f-qqgm-c34q", // widdershins>swagger2openapi>better-ajv-errors>jsonpointer
"GHSA-6vfc-qv3f-vr6c", // widdershins>markdown-it
"GHSA-7fh5-64p2-3v2j", // @mojaloop/central-services-shared>shins>sanitize-html>postcss
"GHSA-mjxr-4v3x-q3m4", // @mojaloop/central-services-shared>shins>sanitize-html
"GHSA-rjqq-98f6-6j3r", // @mojaloop/central-services-shared>shins>sanitize-html
"GHSA-rm97-x556-q36h", // @mojaloop/central-services-shared>shins>sanitize-html
"GHSA-qgmg-gppg-76g5", // swagmock>swagger-parser>z-schema>validator
"GHSA-p9pc-299p-vxgp" // widdershins>yargs>yargs-parser
]
}
140 changes: 140 additions & 0 deletions config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"HOSTNAME": "http://quoting-service",
"LISTEN_ADDRESS": "0.0.0.0",
"PORT": 3002,
"MONITORING_PORT": 3003,
"AMOUNT": {
"PRECISION": 18,
"SCALE": 4
Expand Down Expand Up @@ -228,6 +229,83 @@
}
}
}
},
"FX_QUOTE": {
"POST": {
"topic": "topic-fx-quotes-post",
"config": {
"options": {
"mode": 2,
"batchSize": 1,
"pollFrequency": 10,
"recursiveTimeout": 100,
"messageCharset": "utf8",
"messageAsJSON": true,
"sync": true,
"consumeTimeout": 1000
},
"rdkafkaConf": {
"client.id": "fx-quotes-handler-post_c",
"group.id": "group-fx-quotes-handler-post",
"metadata.broker.list": "localhost:9092",
"socket.keepalive.enable": true,
"allow.auto.create.topics": true
},
"topicConf": {
"auto.offset.reset": "earliest"
}
}
},
"PUT": {
"topic": "topic-fx-quotes-put",
"config": {
"options": {
"mode": 2,
"batchSize": 1,
"pollFrequency": 10,
"recursiveTimeout": 100,
"messageCharset": "utf8",
"messageAsJSON": true,
"sync": true,
"consumeTimeout": 1000
},
"rdkafkaConf": {
"client.id": "fx-quotes-handler-put_c",
"group.id": "group-fx-quotes-handler-put",
"metadata.broker.list": "localhost:9092",
"socket.keepalive.enable": true,
"allow.auto.create.topics": true
},
"topicConf": {
"auto.offset.reset": "earliest"
}
}
},
"GET": {
"topic": "topic-fx-quotes-get",
"config": {
"options": {
"mode": 2,
"batchSize": 1,
"pollFrequency": 10,
"recursiveTimeout": 100,
"messageCharset": "utf8",
"messageAsJSON": true,
"sync": true,
"consumeTimeout": 1000
},
"rdkafkaConf": {
"client.id": "fx-quotes-handler-get_c",
"group.id": "group-fx-quotes-handler-get",
"metadata.broker.list": "localhost:9092",
"socket.keepalive.enable": true,
"allow.auto.create.topics": true
},
"topicConf": {
"auto.offset.reset": "earliest"
}
}
}
}
},
"PRODUCER": {
Expand Down Expand Up @@ -354,6 +432,68 @@
}
}
}
},
"FX_QUOTE": {
"POST": {
"topic": "topic-fx-quotes-post",
"config": {
"options": {
"messageCharset": "utf8"
},
"rdkafkaConf": {
"metadata.broker.list": "localhost:9092",
"client.id": "fx-quotes-handler-post_p",
"event_cb": true,
"dr_cb": true,
"socket.keepalive.enable": true,
"queue.buffering.max.messages": 10000000
},
"topicConf": {
"request.required.acks": "all",
"partitioner": "murmur2_random"
}
}
},
"PUT": {
"topic": "topic-fx-quotes-put",
"config": {
"options": {
"messageCharset": "utf8"
},
"rdkafkaConf": {
"metadata.broker.list": "localhost:9092",
"client.id": "fx-quotes-handler-put_p",
"event_cb": true,
"dr_cb": true,
"socket.keepalive.enable": true,
"queue.buffering.max.messages": 10000000
},
"topicConf": {
"request.required.acks": "all",
"partitioner": "murmur2_random"
}
}
},
"GET": {
"topic": "topic-fx-quotes-get",
"config": {
"options": {
"messageCharset": "utf8"
},
"rdkafkaConf": {
"metadata.broker.list": "localhost:9092",
"client.id": "fx-quotes-handler-get_p",
"event_cb": true,
"dr_cb": true,
"socket.keepalive.enable": true,
"queue.buffering.max.messages": 10000000
},
"topicConf": {
"request.required.acks": "all",
"partitioner": "murmur2_random"
}
}
}
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion docker/kafka/scripts/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ topics=(
"topic-bulk-fulfil"
"topic-bulk-processing"
"topic-bulk-get"

"topic-quotes-post"
"topic-quotes-put"
"topic-quotes-get"
"topic-bulkquotes-post"
"topic-bulkquotes-put"
"topic-bulkquotes-get"
"topic-fx-quotes-post"
"topic-fx-quotes-put"
"topic-fx-quotes-get"
)

# Loop through the topics and create them using kafka-topics.sh
Expand Down
Loading

0 comments on commit 9bf52f0

Please sign in to comment.