account-lookup-service 15.5.0-iso.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.circleci/config.yml +11 -0
- package/.ncurc.yaml +6 -0
- package/.nvmrc +1 -0
- package/.nycrc.yml +20 -0
- package/.versionrc +15 -0
- package/CHANGELOG.md +330 -0
- package/CODEOWNERS +38 -0
- package/Dockerfile +45 -0
- package/LICENSE.md +10 -0
- package/README.md +252 -0
- package/audit-ci.jsonc +32 -0
- package/audit-resolve.json +161 -0
- package/config/default.json +109 -0
- package/config/knexfile.js +21 -0
- package/docker/account-lookup-service/default.json +106 -0
- package/docker/account-lookup-service/make-default-json.sh +5 -0
- package/docker/account-lookup-service/override.json +15 -0
- package/docker/central-ledger/default.json +458 -0
- package/docker/config-modifier/account-lookup-service.js +31 -0
- package/docker/kafka/consumer.properties +26 -0
- package/docker/kafka/producer.properties +45 -0
- package/docker/kafka/server.properties +143 -0
- package/docker/kafka/tools-log4j.properties +21 -0
- package/docker/mock-proxy/Dockerfile +15 -0
- package/docker/mock-proxy/package-lock.json +4986 -0
- package/docker/mock-proxy/package.json +24 -0
- package/docker/mock-proxy/src/config.ts +14 -0
- package/docker/mock-proxy/src/server.ts +94 -0
- package/docker/mock-proxy/src/utils.ts +29 -0
- package/docker/mock-proxy/tsconfig.json +24 -0
- package/docker/sql-init/01_permissions.sql +2 -0
- package/docker/sql-init-central-ledger/01_permissions.sql +2 -0
- package/docker/wait-for/wait-for-account-lookup-service.sh +10 -0
- package/docker/wait-for/wait-for-central-ledger.sh +11 -0
- package/docker/wait-for/wait-for-kafka.sh +7 -0
- package/docker/wait-for/wait-for-ml-api-adapter.sh +9 -0
- package/docker/wait-for/wait-for-mockserver.sh +20 -0
- package/docker/wait-for/wait-for-mysql-als.sh +14 -0
- package/docker/wait-for/wait-for-mysql-central-ledger.sh +11 -0
- package/docker/wait-for/wait-for-mysql.sh +11 -0
- package/docker/wait-for/wait-for-objstore.sh +12 -0
- package/docker/wait-for/wait-for.env +18 -0
- package/docker/wait-for/wait-for.sh +81 -0
- package/docker-compose.integration.yml +29 -0
- package/docker-compose.yml +243 -0
- package/jest-int.config.js +8 -0
- package/jest.config.js +16 -0
- package/jsdoc.json +38 -0
- package/migrations/01_currency.js +42 -0
- package/migrations/02_endpointType.js +43 -0
- package/migrations/03_endpointType-indexes.js +37 -0
- package/migrations/04_partyIdType.js +43 -0
- package/migrations/05_partyIdType-indexes.js +38 -0
- package/migrations/08_oracleEndpoint.js +51 -0
- package/migrations/09_oracleEndpoint-indexes.js +41 -0
- package/migrations/10_oracleEndpoint-remove-constraints.js +38 -0
- package/package.json +180 -0
- package/scripts/_wait4_all.js +143 -0
- package/scripts/test-functional.sh +76 -0
- package/secrets/jwsSigningKey.key +27 -0
- package/seeds/currency.js +765 -0
- package/seeds/endpointType.js +65 -0
- package/seeds/partyIdType.js +79 -0
- package/src/api/endpointcache.js +67 -0
- package/src/api/health.js +66 -0
- package/src/api/index.js +85 -0
- package/src/api/oracles/{ID}.js +100 -0
- package/src/api/oracles.js +96 -0
- package/src/api/participants/{ID}/error.js +44 -0
- package/src/api/participants/{ID}.js +44 -0
- package/src/api/participants/{Type}/{ID}/error.js +74 -0
- package/src/api/participants/{Type}/{ID}/{SubId}/error.js +68 -0
- package/src/api/participants/{Type}/{ID}/{SubId}.js +113 -0
- package/src/api/participants/{Type}/{ID}.js +133 -0
- package/src/api/participants.js +63 -0
- package/src/api/parties/{Type}/{ID}/error.js +66 -0
- package/src/api/parties/{Type}/{ID}/{SubId}/error.js +56 -0
- package/src/api/parties/{Type}/{ID}/{SubId}.js +77 -0
- package/src/api/parties/{Type}/{ID}.js +98 -0
- package/src/api/routes.js +294 -0
- package/src/constants.js +16 -0
- package/src/domain/oracle/index.js +33 -0
- package/src/domain/oracle/oracle.js +234 -0
- package/src/domain/participants/index.js +35 -0
- package/src/domain/participants/participants.js +560 -0
- package/src/domain/parties/getPartiesByTypeAndID.js +239 -0
- package/src/domain/parties/index.js +32 -0
- package/src/domain/parties/parties.js +215 -0
- package/src/domain/parties/utils.js +84 -0
- package/src/domain/timeout/dto.js +48 -0
- package/src/domain/timeout/index.js +104 -0
- package/src/handlers/TimeoutHandler.js +94 -0
- package/src/handlers/index.js +70 -0
- package/src/handlers/monitoring/index.js +51 -0
- package/src/handlers/monitoring/plugins/health.js +61 -0
- package/src/handlers/monitoring/plugins/metrics.js +48 -0
- package/src/handlers/register.js +102 -0
- package/src/index.js +66 -0
- package/src/interface/admin-swagger.yaml +804 -0
- package/src/interface/admin_swagger.json +959 -0
- package/src/interface/api-swagger-iso20022-parties.yaml +1734 -0
- package/src/interface/api-swagger.yaml +1733 -0
- package/src/interface/api_swagger.json +3046 -0
- package/src/interface/fspiop-rest-v2.0-ISO20022_parties.yaml +2256 -0
- package/src/interface/thirdparty/admin-swagger.yaml +808 -0
- package/src/interface/thirdparty/admin_swagger.json +961 -0
- package/src/interface/thirdparty/api-swagger.yaml +1739 -0
- package/src/interface/thirdparty/api_swagger.json +3142 -0
- package/src/lib/argv.js +39 -0
- package/src/lib/cache.js +126 -0
- package/src/lib/config.js +183 -0
- package/src/lib/db.js +26 -0
- package/src/lib/headers.js +53 -0
- package/src/lib/healthCheck/subServiceHealth.js +84 -0
- package/src/lib/index.js +11 -0
- package/src/lib/migrator.js +17 -0
- package/src/lib/requestLogger.js +54 -0
- package/src/lib/util.js +66 -0
- package/src/metrics/handler.js +33 -0
- package/src/metrics/plugin.js +52 -0
- package/src/metrics/routes.js +43 -0
- package/src/models/currency/currency.js +48 -0
- package/src/models/currency/index.js +32 -0
- package/src/models/endpointType/endpointType.js +48 -0
- package/src/models/endpointType/index.js +32 -0
- package/src/models/misc/migrationLock.js +49 -0
- package/src/models/oracle/facade.js +341 -0
- package/src/models/oracle/index.js +41 -0
- package/src/models/oracle/oracleEndpoint.js +192 -0
- package/src/models/oracle/oracleEndpointCached.js +108 -0
- package/src/models/participantEndpoint/facade.js +238 -0
- package/src/models/partyIdType/index.js +32 -0
- package/src/models/partyIdType/partyIdType.js +41 -0
- package/src/plugins.js +139 -0
- package/src/server.js +199 -0
- package/test/fixtures/index.js +131 -0
- package/test/fixtures/iso.js +110 -0
- package/test/integration/.env +8 -0
- package/test/integration/api/parties.test.js +137 -0
- package/test/integration/constants.js +20 -0
- package/test/integration/domain/oracle/index.test.js +324 -0
- package/test/integration/domain/timeout/index.test.js +75 -0
- package/test/integration/env.sh +15 -0
- package/test/integration/example.test.js +12 -0
- package/test/integration/models/currency/currency.test.js +68 -0
- package/test/integration/plugins.test.js +62 -0
- package/test/integration/prepareTestParticipants.js +30 -0
- package/test/integration/setup.js +5 -0
- package/test/integration-config.json +81 -0
- package/test/integration-runner.sh +108 -0
- package/test/unit/api/health.test.js +142 -0
- package/test/unit/api/oracles/{ID}.test.js +264 -0
- package/test/unit/api/oracles.test.js +173 -0
- package/test/unit/api/participants/participants.test.js +117 -0
- package/test/unit/api/participants/{Type}/{ID}/error.test.js +155 -0
- package/test/unit/api/participants/{Type}/{ID}/{SubId}/error.test.js +131 -0
- package/test/unit/api/participants/{Type}/{ID}/{SubId}.test.js +377 -0
- package/test/unit/api/participants/{Type}/{ID}.test.js +383 -0
- package/test/unit/api/participants.test.js +108 -0
- package/test/unit/api/parties/endpointcache.test.js +83 -0
- package/test/unit/api/parties/parties.test.js +102 -0
- package/test/unit/api/parties/{Type}/{ID}/error.test.js +145 -0
- package/test/unit/api/parties/{Type}/{ID}/{SubId}/error.test.js +141 -0
- package/test/unit/api/parties/{Type}/{ID}/{SubId}.test.js +241 -0
- package/test/unit/api/parties/{Type}/{ID}.test.js +240 -0
- package/test/unit/domain/oracle/oracle.test.js +505 -0
- package/test/unit/domain/participants/participants.test.js +1724 -0
- package/test/unit/domain/parties/parties.test.js +940 -0
- package/test/unit/domain/timeout/dto.test.js +28 -0
- package/test/unit/domain/timeout/index.test.js +81 -0
- package/test/unit/handlers/TimeoutHandler.test.js +125 -0
- package/test/unit/handlers/index.test.js +56 -0
- package/test/unit/handlers/register.test.js +90 -0
- package/test/unit/index.test.js +139 -0
- package/test/unit/iso20022/partiesValidation.test.js +129 -0
- package/test/unit/lib/TransformFacades.test.js +18 -0
- package/test/unit/lib/argv.test.js +40 -0
- package/test/unit/lib/cache.test.js +172 -0
- package/test/unit/lib/config.test.js +108 -0
- package/test/unit/lib/healthCheck/subServiceHealth.test.js +89 -0
- package/test/unit/lib/migrator.test.js +52 -0
- package/test/unit/lib/requestLogger.test.js +115 -0
- package/test/unit/lib/util.test.js +68 -0
- package/test/unit/mocks.js +66 -0
- package/test/unit/models/currency/currency.test.js +91 -0
- package/test/unit/models/endpointType/endpointType.test.js +69 -0
- package/test/unit/models/misc/migrationLock.test.js +96 -0
- package/test/unit/models/oracle/facade.test.js +546 -0
- package/test/unit/models/oracle/oracleEndpoint.test.js +409 -0
- package/test/unit/models/oracle/oracleEndpointCached.test.js +153 -0
- package/test/unit/models/participantEndpoint/facade.test.js +295 -0
- package/test/unit/models/partyIdType/partyIdType.test.js +88 -0
- package/test/unit/plugins.test.js +89 -0
- package/test/unit/setup.js +7 -0
- package/test/util/apiClients/AlsApiClient.js +44 -0
- package/test/util/apiClients/BasicApiClient.js +34 -0
- package/test/util/apiClients/ProxyApiClient.js +25 -0
- package/test/util/apiClients/index.js +7 -0
- package/test/util/helper.js +332 -0
- package/test/util/index.js +11 -0
- package/test/util/mockgen.js +43 -0
- package/test/util/onboarding.js +132 -0
- package/test/util/scripts/addAlsDb.sh +33 -0
- package/test/util/scripts/configureMockServer.sh +35 -0
- package/test/util/scripts/env.sh +19 -0
- package/test/util/scripts/populateTestData.sh +62 -0
- package/test/util/scripts/startMockCentralServer.sh +45 -0
- package/test/util/scripts/startMockOracleServer.sh +45 -0
- package/test/util/testConfig.js +44 -0
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"DATABASE": {
|
3
|
+
"HOST": "mysql-als"
|
4
|
+
},
|
5
|
+
"PROXY_CACHE": {
|
6
|
+
"type": "redis-cluster",
|
7
|
+
"proxyConfig": {
|
8
|
+
"cluster": [
|
9
|
+
{ "host": "redis-node-0", "port": 6379 }
|
10
|
+
]
|
11
|
+
}
|
12
|
+
},
|
13
|
+
"SWITCH_ENDPOINT": "http://central-ledger:3001",
|
14
|
+
"LOG_LEVEL": "debug"
|
15
|
+
}
|
@@ -0,0 +1,458 @@
|
|
1
|
+
{
|
2
|
+
"PORT": 3001,
|
3
|
+
"HOSTNAME": "http://central-ledger",
|
4
|
+
"DATABASE": {
|
5
|
+
"DIALECT": "mysql",
|
6
|
+
"HOST": "mysql-cl",
|
7
|
+
"PORT": 3306,
|
8
|
+
"USER": "central_ledger",
|
9
|
+
"PASSWORD": "password",
|
10
|
+
"SCHEMA": "central_ledger",
|
11
|
+
"POOL_MIN_SIZE": 10,
|
12
|
+
"POOL_MAX_SIZE": 10,
|
13
|
+
"ACQUIRE_TIMEOUT_MILLIS": 30000,
|
14
|
+
"CREATE_TIMEOUT_MILLIS": 30000,
|
15
|
+
"DESTROY_TIMEOUT_MILLIS": 5000,
|
16
|
+
"IDLE_TIMEOUT_MILLIS": 30000,
|
17
|
+
"REAP_INTERVAL_MILLIS": 1000,
|
18
|
+
"CREATE_RETRY_INTERVAL_MILLIS": 200,
|
19
|
+
"DEBUG": false
|
20
|
+
},
|
21
|
+
"PROXY_CACHE": {
|
22
|
+
"enabled": true,
|
23
|
+
"type": "redis-cluster",
|
24
|
+
"proxyConfig": {
|
25
|
+
"cluster": [
|
26
|
+
{ "host": "redis-node-0", "port": 6379 }
|
27
|
+
]
|
28
|
+
}
|
29
|
+
},
|
30
|
+
"MIGRATIONS": {
|
31
|
+
"DISABLED": false,
|
32
|
+
"RUN_DATA_MIGRATIONS": true
|
33
|
+
},
|
34
|
+
"AMOUNT": {
|
35
|
+
"PRECISION": 10,
|
36
|
+
"SCALE": 2
|
37
|
+
},
|
38
|
+
"SIDECAR": {
|
39
|
+
"DISABLED": true,
|
40
|
+
"HOST": "localhost",
|
41
|
+
"PORT": 5678,
|
42
|
+
"CONNECT_TIMEOUT": 45000,
|
43
|
+
"RECONNECT_INTERVAL": 5000
|
44
|
+
},
|
45
|
+
"DB_CONNECTION": {
|
46
|
+
"POOL_MIN": 10,
|
47
|
+
"POOL_MAX": 30
|
48
|
+
},
|
49
|
+
"MONGODB": {
|
50
|
+
"DISABLED": false,
|
51
|
+
"URI": "mongodb://objstore:27017/mlos"
|
52
|
+
},
|
53
|
+
"ERROR_HANDLING": {
|
54
|
+
"includeCauseExtension": true,
|
55
|
+
"truncateCause": false
|
56
|
+
},
|
57
|
+
"HANDLERS": {
|
58
|
+
"DISABLED": false,
|
59
|
+
"API": {
|
60
|
+
"DISABLED": false
|
61
|
+
},
|
62
|
+
"CRON": {
|
63
|
+
"DISABLED": false,
|
64
|
+
"TIMEXP": "*/10 * * * * *",
|
65
|
+
"TIMEZONE": "UTC"
|
66
|
+
},
|
67
|
+
"TIMEOUT": {
|
68
|
+
"DISABLED": false,
|
69
|
+
"TIMEXP": "*/15 * * * * *",
|
70
|
+
"TIMEZONE": "UTC"
|
71
|
+
}
|
72
|
+
},
|
73
|
+
"INSTRUMENTATION": {
|
74
|
+
"METRICS": {
|
75
|
+
"DISABLED": false,
|
76
|
+
"labels": {
|
77
|
+
"fspId": "*"
|
78
|
+
},
|
79
|
+
"config": {
|
80
|
+
"timeout": 5000,
|
81
|
+
"prefix": "moja_cl_",
|
82
|
+
"defaultLabels": {
|
83
|
+
"serviceName": "central-service"
|
84
|
+
}
|
85
|
+
}
|
86
|
+
}
|
87
|
+
},
|
88
|
+
"PARTICIPANT_INITIAL_POSITION": 0,
|
89
|
+
"HUB_PARTICIPANT": {
|
90
|
+
"ID": 1,
|
91
|
+
"NAME": "Hub",
|
92
|
+
"ACCOUNTS": [
|
93
|
+
"HUB_RECONCILIATION",
|
94
|
+
"HUB_MULTILATERAL_SETTLEMENT",
|
95
|
+
"HUB_FEE"
|
96
|
+
]
|
97
|
+
},
|
98
|
+
"INTERNAL_TRANSFER_VALIDITY_SECONDS": "432000",
|
99
|
+
"CACHE": {
|
100
|
+
"CACHE_ENABLED": false,
|
101
|
+
"MAX_BYTE_SIZE": 10000000,
|
102
|
+
"EXPIRES_IN_MS": 1000
|
103
|
+
},
|
104
|
+
"KAFKA": {
|
105
|
+
"TOPIC_TEMPLATES": {
|
106
|
+
"PARTICIPANT_TOPIC_TEMPLATE": {
|
107
|
+
"TEMPLATE": "topic-{{participantName}}-{{functionality}}-{{action}}",
|
108
|
+
"REGEX": "topic-(.*)-(.*)-(.*)"
|
109
|
+
},
|
110
|
+
"GENERAL_TOPIC_TEMPLATE": {
|
111
|
+
"TEMPLATE": "topic-{{functionality}}-{{action}}",
|
112
|
+
"REGEX": "topic-(.*)-(.*)"
|
113
|
+
}
|
114
|
+
},
|
115
|
+
"CONSUMER": {
|
116
|
+
"BULK": {
|
117
|
+
"PREPARE": {
|
118
|
+
"config": {
|
119
|
+
"options": {
|
120
|
+
"mode": 2,
|
121
|
+
"batchSize": 1,
|
122
|
+
"pollFrequency": 10,
|
123
|
+
"recursiveTimeout": 100,
|
124
|
+
"messageCharset": "utf8",
|
125
|
+
"messageAsJSON": true,
|
126
|
+
"sync": true,
|
127
|
+
"consumeTimeout": 1000
|
128
|
+
},
|
129
|
+
"rdkafkaConf": {
|
130
|
+
"client.id": "cl-con-bulk-prepare",
|
131
|
+
"group.id": "cl-group-bulk-prepare",
|
132
|
+
"metadata.broker.list": "kafka:29092",
|
133
|
+
"socket.keepalive.enable": true,
|
134
|
+
"allow.auto.create.topics": true
|
135
|
+
},
|
136
|
+
"topicConf": {
|
137
|
+
"auto.offset.reset": "earliest"
|
138
|
+
}
|
139
|
+
}
|
140
|
+
},
|
141
|
+
"PROCESSING": {
|
142
|
+
"config": {
|
143
|
+
"options": {
|
144
|
+
"mode": 2,
|
145
|
+
"batchSize": 1,
|
146
|
+
"pollFrequency": 10,
|
147
|
+
"recursiveTimeout": 100,
|
148
|
+
"messageCharset": "utf8",
|
149
|
+
"messageAsJSON": true,
|
150
|
+
"sync": true,
|
151
|
+
"consumeTimeout": 1000
|
152
|
+
},
|
153
|
+
"rdkafkaConf": {
|
154
|
+
"client.id": "cl-con-bulk-processing",
|
155
|
+
"group.id": "cl-group-bulk-processing",
|
156
|
+
"metadata.broker.list": "kafka:29092",
|
157
|
+
"socket.keepalive.enable": true,
|
158
|
+
"allow.auto.create.topics": true
|
159
|
+
},
|
160
|
+
"topicConf": {
|
161
|
+
"auto.offset.reset": "earliest"
|
162
|
+
}
|
163
|
+
}
|
164
|
+
},
|
165
|
+
"FULFIL": {
|
166
|
+
"config": {
|
167
|
+
"options": {
|
168
|
+
"mode": 2,
|
169
|
+
"batchSize": 1,
|
170
|
+
"pollFrequency": 10,
|
171
|
+
"recursiveTimeout": 100,
|
172
|
+
"messageCharset": "utf8",
|
173
|
+
"messageAsJSON": true,
|
174
|
+
"sync": true,
|
175
|
+
"consumeTimeout": 1000
|
176
|
+
},
|
177
|
+
"rdkafkaConf": {
|
178
|
+
"client.id": "cl-con-bulk-fulfil",
|
179
|
+
"group.id": "cl-group-bulk-fulfil",
|
180
|
+
"metadata.broker.list": "kafka:29092",
|
181
|
+
"socket.keepalive.enable": true,
|
182
|
+
"allow.auto.create.topics": true
|
183
|
+
},
|
184
|
+
"topicConf": {
|
185
|
+
"auto.offset.reset": "earliest"
|
186
|
+
}
|
187
|
+
}
|
188
|
+
},
|
189
|
+
"GET": {
|
190
|
+
"config": {
|
191
|
+
"options": {
|
192
|
+
"mode": 2,
|
193
|
+
"batchSize": 1,
|
194
|
+
"pollFrequency": 10,
|
195
|
+
"recursiveTimeout": 100,
|
196
|
+
"messageCharset": "utf8",
|
197
|
+
"messageAsJSON": true,
|
198
|
+
"sync": true,
|
199
|
+
"consumeTimeout": 1000
|
200
|
+
},
|
201
|
+
"rdkafkaConf": {
|
202
|
+
"client.id": "cl-con-bulk-get",
|
203
|
+
"group.id": "cl-group-bulk-get",
|
204
|
+
"metadata.broker.list": "kafka:29092",
|
205
|
+
"socket.keepalive.enable": true,
|
206
|
+
"allow.auto.create.topics": true
|
207
|
+
},
|
208
|
+
"topicConf": {
|
209
|
+
"auto.offset.reset": "earliest"
|
210
|
+
}
|
211
|
+
}
|
212
|
+
}
|
213
|
+
},
|
214
|
+
"TRANSFER": {
|
215
|
+
"PREPARE": {
|
216
|
+
"config": {
|
217
|
+
"options": {
|
218
|
+
"mode": 2,
|
219
|
+
"batchSize": 1,
|
220
|
+
"pollFrequency": 10,
|
221
|
+
"recursiveTimeout": 100,
|
222
|
+
"messageCharset": "utf8",
|
223
|
+
"messageAsJSON": true,
|
224
|
+
"sync": true,
|
225
|
+
"consumeTimeout": 1000
|
226
|
+
},
|
227
|
+
"rdkafkaConf": {
|
228
|
+
"client.id": "cl-con-transfer-prepare",
|
229
|
+
"group.id": "cl-group-transfer-prepare",
|
230
|
+
"metadata.broker.list": "kafka:29092",
|
231
|
+
"socket.keepalive.enable": true,
|
232
|
+
"allow.auto.create.topics": true
|
233
|
+
},
|
234
|
+
"topicConf": {
|
235
|
+
"auto.offset.reset": "earliest"
|
236
|
+
}
|
237
|
+
}
|
238
|
+
},
|
239
|
+
"GET": {
|
240
|
+
"config": {
|
241
|
+
"options": {
|
242
|
+
"mode": 2,
|
243
|
+
"batchSize": 1,
|
244
|
+
"pollFrequency": 10,
|
245
|
+
"recursiveTimeout": 100,
|
246
|
+
"messageCharset": "utf8",
|
247
|
+
"messageAsJSON": true,
|
248
|
+
"sync": true,
|
249
|
+
"consumeTimeout": 1000
|
250
|
+
},
|
251
|
+
"rdkafkaConf": {
|
252
|
+
"client.id": "cl-con-transfer-get",
|
253
|
+
"group.id": "cl-group-transfer-get",
|
254
|
+
"metadata.broker.list": "kafka:29092",
|
255
|
+
"socket.keepalive.enable": true,
|
256
|
+
"allow.auto.create.topics": true
|
257
|
+
},
|
258
|
+
"topicConf": {
|
259
|
+
"auto.offset.reset": "earliest"
|
260
|
+
}
|
261
|
+
}
|
262
|
+
},
|
263
|
+
"FULFIL": {
|
264
|
+
"config": {
|
265
|
+
"options": {
|
266
|
+
"mode": 2,
|
267
|
+
"batchSize": 1,
|
268
|
+
"pollFrequency": 10,
|
269
|
+
"recursiveTimeout": 100,
|
270
|
+
"messageCharset": "utf8",
|
271
|
+
"messageAsJSON": true,
|
272
|
+
"sync": true,
|
273
|
+
"consumeTimeout": 1000
|
274
|
+
},
|
275
|
+
"rdkafkaConf": {
|
276
|
+
"client.id": "cl-con-transfer-fulfil",
|
277
|
+
"group.id": "cl-group-transfer-fulfil",
|
278
|
+
"metadata.broker.list": "kafka:29092",
|
279
|
+
"socket.keepalive.enable": true,
|
280
|
+
"allow.auto.create.topics": true
|
281
|
+
},
|
282
|
+
"topicConf": {
|
283
|
+
"auto.offset.reset": "earliest"
|
284
|
+
}
|
285
|
+
}
|
286
|
+
},
|
287
|
+
"POSITION": {
|
288
|
+
"config": {
|
289
|
+
"options": {
|
290
|
+
"mode": 2,
|
291
|
+
"batchSize": 1,
|
292
|
+
"pollFrequency": 10,
|
293
|
+
"recursiveTimeout": 100,
|
294
|
+
"messageCharset": "utf8",
|
295
|
+
"messageAsJSON": true,
|
296
|
+
"sync": true,
|
297
|
+
"consumeTimeout": 1000
|
298
|
+
},
|
299
|
+
"rdkafkaConf": {
|
300
|
+
"client.id": "cl-con-transfer-position",
|
301
|
+
"group.id": "cl-group-transfer-position",
|
302
|
+
"metadata.broker.list": "kafka:29092",
|
303
|
+
"socket.keepalive.enable": true,
|
304
|
+
"allow.auto.create.topics": true
|
305
|
+
},
|
306
|
+
"topicConf": {
|
307
|
+
"auto.offset.reset": "earliest"
|
308
|
+
}
|
309
|
+
}
|
310
|
+
}
|
311
|
+
},
|
312
|
+
"ADMIN": {
|
313
|
+
"TRANSFER": {
|
314
|
+
"config": {
|
315
|
+
"options": {
|
316
|
+
"mode": 2,
|
317
|
+
"batchSize": 1,
|
318
|
+
"pollFrequency": 10,
|
319
|
+
"recursiveTimeout": 100,
|
320
|
+
"messageCharset": "utf8",
|
321
|
+
"messageAsJSON": true,
|
322
|
+
"sync": true,
|
323
|
+
"consumeTimeout": 1000
|
324
|
+
},
|
325
|
+
"rdkafkaConf": {
|
326
|
+
"client.id": "cl-con-transfer-admin",
|
327
|
+
"group.id": "cl-group-transfer-admin",
|
328
|
+
"metadata.broker.list": "kafka:29092",
|
329
|
+
"socket.keepalive.enable": true,
|
330
|
+
"allow.auto.create.topics": true
|
331
|
+
},
|
332
|
+
"topicConf": {
|
333
|
+
"auto.offset.reset": "earliest"
|
334
|
+
}
|
335
|
+
}
|
336
|
+
}
|
337
|
+
}
|
338
|
+
},
|
339
|
+
"PRODUCER": {
|
340
|
+
"BULK": {
|
341
|
+
"PROCESSING": {
|
342
|
+
"config": {
|
343
|
+
"options": {
|
344
|
+
"messageCharset": "utf8"
|
345
|
+
},
|
346
|
+
"rdkafkaConf": {
|
347
|
+
"metadata.broker.list": "kafka:29092",
|
348
|
+
"client.id": "cl-prod-bulk-processing",
|
349
|
+
"event_cb": true,
|
350
|
+
"dr_cb": true,
|
351
|
+
"socket.keepalive.enable": true,
|
352
|
+
"queue.buffering.max.messages": 10000000
|
353
|
+
},
|
354
|
+
"topicConf": {
|
355
|
+
"request.required.acks": "all"
|
356
|
+
}
|
357
|
+
}
|
358
|
+
}
|
359
|
+
},
|
360
|
+
"TRANSFER": {
|
361
|
+
"PREPARE": {
|
362
|
+
"config": {
|
363
|
+
"options": {
|
364
|
+
"messageCharset": "utf8"
|
365
|
+
},
|
366
|
+
"rdkafkaConf": {
|
367
|
+
"metadata.broker.list": "kafka:29092",
|
368
|
+
"client.id": "cl-prod-transfer-prepare",
|
369
|
+
"event_cb": true,
|
370
|
+
"dr_cb": true,
|
371
|
+
"socket.keepalive.enable": true,
|
372
|
+
"queue.buffering.max.messages": 10000000
|
373
|
+
},
|
374
|
+
"topicConf": {
|
375
|
+
"request.required.acks": "all"
|
376
|
+
}
|
377
|
+
}
|
378
|
+
},
|
379
|
+
"FULFIL": {
|
380
|
+
"config": {
|
381
|
+
"options": {
|
382
|
+
"messageCharset": "utf8"
|
383
|
+
},
|
384
|
+
"rdkafkaConf": {
|
385
|
+
"metadata.broker.list": "kafka:29092",
|
386
|
+
"client.id": "cl-prod-transfer-fulfil",
|
387
|
+
"event_cb": true,
|
388
|
+
"dr_cb": true,
|
389
|
+
"socket.keepalive.enable": true,
|
390
|
+
"queue.buffering.max.messages": 10000000
|
391
|
+
},
|
392
|
+
"topicConf": {
|
393
|
+
"request.required.acks": "all"
|
394
|
+
}
|
395
|
+
}
|
396
|
+
},
|
397
|
+
"POSITION": {
|
398
|
+
"config": {
|
399
|
+
"options": {
|
400
|
+
"messageCharset": "utf8"
|
401
|
+
},
|
402
|
+
"rdkafkaConf": {
|
403
|
+
"metadata.broker.list": "kafka:29092",
|
404
|
+
"client.id": "cl-prod-transfer-position",
|
405
|
+
"event_cb": true,
|
406
|
+
"dr_cb": true,
|
407
|
+
"socket.keepalive.enable": true,
|
408
|
+
"queue.buffering.max.messages": 10000000
|
409
|
+
},
|
410
|
+
"topicConf": {
|
411
|
+
"request.required.acks": "all"
|
412
|
+
}
|
413
|
+
}
|
414
|
+
}
|
415
|
+
},
|
416
|
+
"NOTIFICATION": {
|
417
|
+
"EVENT": {
|
418
|
+
"config": {
|
419
|
+
"options": {
|
420
|
+
"messageCharset": "utf8"
|
421
|
+
},
|
422
|
+
"rdkafkaConf": {
|
423
|
+
"metadata.broker.list": "kafka:29092",
|
424
|
+
"client.id": "cl-prod-notification-event",
|
425
|
+
"event_cb": true,
|
426
|
+
"dr_cb": true,
|
427
|
+
"socket.keepalive.enable": true,
|
428
|
+
"queue.buffering.max.messages": 10000000
|
429
|
+
},
|
430
|
+
"topicConf": {
|
431
|
+
"request.required.acks": "all"
|
432
|
+
}
|
433
|
+
}
|
434
|
+
}
|
435
|
+
},
|
436
|
+
"ADMIN": {
|
437
|
+
"TRANSFER": {
|
438
|
+
"config": {
|
439
|
+
"options": {
|
440
|
+
"messageCharset": "utf8"
|
441
|
+
},
|
442
|
+
"rdkafkaConf": {
|
443
|
+
"metadata.broker.list": "kafka:29092",
|
444
|
+
"client.id": "cl-prod-transfer-admin",
|
445
|
+
"event_cb": true,
|
446
|
+
"dr_cb": true,
|
447
|
+
"socket.keepalive.enable": true,
|
448
|
+
"queue.buffering.max.messages": 10000000
|
449
|
+
},
|
450
|
+
"topicConf": {
|
451
|
+
"request.required.acks": "all"
|
452
|
+
}
|
453
|
+
}
|
454
|
+
}
|
455
|
+
}
|
456
|
+
}
|
457
|
+
}
|
458
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module.exports = {
|
2
|
+
DATABASE: {
|
3
|
+
HOST: 'mysql-als',
|
4
|
+
SCHEMA: 'account_lookup'
|
5
|
+
},
|
6
|
+
SWITCH_ENDPOINT: 'http://central-ledger:3001',
|
7
|
+
GENERAL_CACHE_CONFIG: {
|
8
|
+
CACHE_ENABLED: true,
|
9
|
+
MAX_BYTE_SIZE: 10000000,
|
10
|
+
EXPIRES_IN_MS: 61000
|
11
|
+
},
|
12
|
+
CENTRAL_SHARED_PARTICIPANT_CACHE_CONFIG: {
|
13
|
+
expiresIn: 1,
|
14
|
+
generateTimeout: 30000,
|
15
|
+
getDecoratedValue: true
|
16
|
+
},
|
17
|
+
CENTRAL_SHARED_ENDPOINT_CACHE_CONFIG: {
|
18
|
+
expiresIn: 180000,
|
19
|
+
generateTimeout: 30000,
|
20
|
+
getDecoratedValue: true
|
21
|
+
},
|
22
|
+
PROXY_CACHE: {
|
23
|
+
enabled: true,
|
24
|
+
type: 'redis-cluster',
|
25
|
+
proxyConfig: {
|
26
|
+
cluster: [
|
27
|
+
{ host: 'redis-node-0', port: 6379 }
|
28
|
+
]
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# Licensed to the Apache Software Foundation (ASF) under one or more
|
2
|
+
# contributor license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright ownership.
|
4
|
+
# The ASF licenses this file to You under the Apache License, Version 2.0
|
5
|
+
# (the "License"); you may not use this file except in compliance with
|
6
|
+
# the License. You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
# see org.apache.kafka.clients.consumer.ConsumerConfig for more details
|
16
|
+
|
17
|
+
# list of brokers used for bootstrapping knowledge about the rest of the cluster
|
18
|
+
# format: host1:port1,host2:port2 ...
|
19
|
+
bootstrap.servers=localhost:9092
|
20
|
+
|
21
|
+
# consumer group id
|
22
|
+
group.id=test-consumer-group
|
23
|
+
|
24
|
+
# What to do when there is no initial offset in Kafka or if the current
|
25
|
+
# offset does not exist any more on the server: latest, earliest, none
|
26
|
+
#auto.offset.reset=
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# Licensed to the Apache Software Foundation (ASF) under one or more
|
2
|
+
# contributor license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright ownership.
|
4
|
+
# The ASF licenses this file to You under the Apache License, Version 2.0
|
5
|
+
# (the "License"); you may not use this file except in compliance with
|
6
|
+
# the License. You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
# see org.apache.kafka.clients.producer.ProducerConfig for more details
|
16
|
+
|
17
|
+
############################# Producer Basics #############################
|
18
|
+
|
19
|
+
# list of brokers used for bootstrapping knowledge about the rest of the cluster
|
20
|
+
# format: host1:port1,host2:port2 ...
|
21
|
+
bootstrap.servers=localhost:9092
|
22
|
+
|
23
|
+
# specify the compression codec for all data generated: none, gzip, snappy, lz4, zstd
|
24
|
+
compression.type=none
|
25
|
+
|
26
|
+
# name of the partitioner class for partitioning events; default partition spreads data randomly
|
27
|
+
#partitioner.class=
|
28
|
+
|
29
|
+
# the maximum amount of time the client will wait for the response of a request
|
30
|
+
#request.timeout.ms=
|
31
|
+
|
32
|
+
# how long `KafkaProducer.send` and `KafkaProducer.partitionsFor` will block for
|
33
|
+
#max.block.ms=
|
34
|
+
|
35
|
+
# the producer will wait for up to the given delay to allow other records to be sent so that the sends can be batched together
|
36
|
+
#linger.ms=
|
37
|
+
|
38
|
+
# the maximum size of a request in bytes
|
39
|
+
#max.request.size=
|
40
|
+
|
41
|
+
# the default batch size in bytes when batching multiple records sent to a partition
|
42
|
+
#batch.size=
|
43
|
+
|
44
|
+
# the total bytes of memory the producer can use to buffer records waiting to be sent to the server
|
45
|
+
#buffer.memory=
|