From 895ade9725a9c06f2bf48d4d134b45a3927e43e9 Mon Sep 17 00:00:00 2001 From: Claudio Viola Date: Fri, 3 Jul 2020 15:03:05 +0200 Subject: [PATCH] rebase --- docker/central-ledger/default.json | 132 ++++++++++++++++++++++++++--- docker/ml-api-adapter/default.json | 40 +++++---- 2 files changed, 144 insertions(+), 28 deletions(-) diff --git a/docker/central-ledger/default.json b/docker/central-ledger/default.json index a0633542..7cd21600 100644 --- a/docker/central-ledger/default.json +++ b/docker/central-ledger/default.json @@ -3,7 +3,7 @@ "HOSTNAME": "http://central-ledger", "DATABASE": { "DIALECT": "mysql", - "HOST": "central_ledger", + "HOST": "qs_mysql", "PORT": 3306, "USER": "central_ledger", "PASSWORD": "password", @@ -18,7 +18,10 @@ "CREATE_RETRY_INTERVAL_MILLIS": 200, "DEBUG": false }, - "RUN_MIGRATIONS": true, + "MIGRATIONS": { + "DISABLED": false, + "RUN_DATA_MIGRATIONS": true + }, "AMOUNT": { "PRECISION": 18, "SCALE": 4 @@ -30,9 +33,13 @@ "CONNECT_TIMEOUT": 45000, "RECONNECT_INTERVAL": 5000 }, - "DB_CONNECTION": { - "POOL_MIN": 10, - "POOL_MAX": 30 + "MONGODB": { + "DISABLED": true, + "URI": "mongodb://localhost:27017/mlos" + }, + "ERROR_HANDLING": { + "includeCauseExtension": true, + "truncateExtensions": false }, "HANDLERS": { "DISABLED": false, @@ -76,6 +83,12 @@ ] }, "INTERNAL_TRANSFER_VALIDITY_SECONDS": "432000", + "ENABLE_ON_US_TRANSFERS": false, + "CACHE": { + "CACHE_ENABLED": false, + "MAX_BYTE_SIZE": 10000000, + "EXPIRES_IN_MS": 1000 + }, "KAFKA": { "TOPIC_TEMPLATES": { "PARTICIPANT_TOPIC_TEMPLATE": { @@ -88,6 +101,77 @@ } }, "CONSUMER": { + "BULK": { + "PREPARE": { + "config": { + "options": { + "mode": 2, + "batchSize": 1, + "pollFrequency": 10, + "recursiveTimeout": 100, + "messageCharset": "utf8", + "messageAsJSON": true, + "sync": true, + "consumeTimeout": 1000 + }, + "rdkafkaConf": { + "client.id": "cl-con-bulk-prepare", + "group.id": "cl-group-bulk-prepare", + "metadata.broker.list": "kafka:9092", + "socket.keepalive.enable": true + }, + "topicConf": { + "auto.offset.reset": "earliest" + } + } + }, + "PROCESSING": { + "config": { + "options": { + "mode": 2, + "batchSize": 1, + "pollFrequency": 10, + "recursiveTimeout": 100, + "messageCharset": "utf8", + "messageAsJSON": true, + "sync": true, + "consumeTimeout": 1000 + }, + "rdkafkaConf": { + "client.id": "cl-con-bulk-processing", + "group.id": "cl-group-bulk-processing", + "metadata.broker.list": "kafka:9092", + "socket.keepalive.enable": true + }, + "topicConf": { + "auto.offset.reset": "earliest" + } + } + }, + "FULFIL": { + "config": { + "options": { + "mode": 2, + "batchSize": 1, + "pollFrequency": 10, + "recursiveTimeout": 100, + "messageCharset": "utf8", + "messageAsJSON": true, + "sync": true, + "consumeTimeout": 1000 + }, + "rdkafkaConf": { + "client.id": "cl-con-bulk-fulfil", + "group.id": "cl-group-bulk-fulfil", + "metadata.broker.list": "kafka:9092", + "socket.keepalive.enable": true + }, + "topicConf": { + "auto.offset.reset": "earliest" + } + } + } + }, "TRANSFER": { "PREPARE": { "config": { @@ -209,6 +293,27 @@ } }, "PRODUCER": { + "BULK": { + "PROCESSING": { + "config": { + "options": { + "messageCharset": "utf8" + }, + "rdkafkaConf": { + "metadata.broker.list": "kafka:9092", + "client.id": "cl-prod-bulk-processing", + "event_cb": true, + "dr_cb": true, + "socket.keepalive.enable": true, + "queue.buffering.max.messages": 10000000 + }, + "topicConf": { + "request.required.acks": "all", + "partitioner": "murmur2_random" + } + } + } + }, "TRANSFER": { "PREPARE": { "config": { @@ -224,7 +329,8 @@ "queue.buffering.max.messages": 10000000 }, "topicConf": { - "request.required.acks": "all" + "request.required.acks": "all", + "partitioner": "murmur2_random" } } }, @@ -242,7 +348,8 @@ "queue.buffering.max.messages": 10000000 }, "topicConf": { - "request.required.acks": "all" + "request.required.acks": "all", + "partitioner": "murmur2_random" } } }, @@ -260,7 +367,8 @@ "queue.buffering.max.messages": 10000000 }, "topicConf": { - "request.required.acks": "all" + "request.required.acks": "all", + "partitioner": "murmur2_random" } } } @@ -280,7 +388,8 @@ "queue.buffering.max.messages": 10000000 }, "topicConf": { - "request.required.acks": "all" + "request.required.acks": "all", + "partitioner": "murmur2_random" } } } @@ -300,11 +409,12 @@ "queue.buffering.max.messages": 10000000 }, "topicConf": { - "request.required.acks": "all" + "request.required.acks": "all", + "partitioner": "murmur2_random" } } } } } } -} \ No newline at end of file +} diff --git a/docker/ml-api-adapter/default.json b/docker/ml-api-adapter/default.json index 0a1b3637..d7781df9 100644 --- a/docker/ml-api-adapter/default.json +++ b/docker/ml-api-adapter/default.json @@ -2,16 +2,31 @@ "PORT": 3000, "HOSTNAME": "http://ml-api-adapter", "ENDPOINT_SOURCE_URL": "http://central-ledger:3001/participants/{{fsp}}/endpoints", + "ENDPOINT_HEALTH_URL": "http://central-ledger:3001/health", "ENDPOINT_CACHE_CONFIG": { "expiresIn": 180000, "generateTimeout": 30000 }, - "ENDPOINT_SECURITY": { + "ENDPOINT_SECURITY":{ "TLS": { "rejectUnauthorized": true + }, + "JWS": { + "JWS_SIGN": false, + "FSPIOP_SOURCE_TO_SIGN": "switch", + "JWS_SIGNING_KEY_PATH": "secrets/jwsSigningKey.key" } }, + "MAX_CALLBACK_TIME_LAG_DILATION_MILLISECONDS": 200, "MAX_FULFIL_TIMEOUT_DURATION_SECONDS": 300, + "TRANSFERS": { + "SEND_TRANSFER_CONFIRMATION_TO_PAYEE": true + }, + "STRIP_UNKNOWN_HEADERS": false, + "ERROR_HANDLING": { + "includeCauseExtension": false, + "truncateExtensions": true + }, "AMOUNT": { "PRECISION": 10, "SCALE": 2 @@ -39,18 +54,6 @@ "GENERAL_TOPIC_TEMPLATE": { "TEMPLATE": "topic-{{functionality}}-{{action}}", "REGEX": "topic-(.*)-(.*)" - }, - "NOTIFICATION_TOPIC_TEMPLATE": { - "TEMPLATE": "topic-notification-event", - "REGEX": "topic-notification-event" - }, - "FULFIL_TOPIC_TEMPLATE": { - "TEMPLATE": "topic-transfer-fulfil", - "REGEX": "topic-transfer-fulfil" - }, - "GET_TRANSFERS_TOPIC_TEMPLATE": { - "TEMPLATE": "topic-transfer-get", - "REGEX": "topic-transfer-get" } }, "CONSUMER": { @@ -96,7 +99,8 @@ "queue.buffering.max.messages": 10000000 }, "topicConf": { - "request.required.acks": "all" + "request.required.acks": "all", + "partitioner": "murmur2_random" } } }, @@ -114,7 +118,8 @@ "queue.buffering.max.messages": 10000000 }, "topicConf": { - "request.required.acks": "all" + "request.required.acks": "all", + "partitioner": "murmur2_random" } } }, @@ -132,11 +137,12 @@ "queue.buffering.max.messages": 10000000 }, "topicConf": { - "request.required.acks": "all" + "request.required.acks": "all", + "partitioner": "murmur2_random" } } } } } } -} \ No newline at end of file +}