-
Notifications
You must be signed in to change notification settings - Fork 1
/
baseConfig.js
95 lines (95 loc) · 3.22 KB
/
baseConfig.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
module.exports = {
kafka: {
defaultPartitions: "auto",
producer: {
noptions: {
"metadata.broker.list": "localhost:9092",
"client.id": "zamza-base-client",
"event_cb": false,
// "compression.codec": "snappy",
"api.version.request": true,
"socket.keepalive.enable": true,
"socket.blocking.max.ms": 100,
"heartbeat.interval.ms": 250,
"retry.backoff.ms": 250,
//"security.protocol": "sasl_ssl",
//"ssl.key.location": "/tmp/kafka-clients-key/service-client.key.pem",
//"ssl.certificate.location": "/tmp/kafka-clients-certificate/service-client.cert.pem",
//"ssl.ca.location": "/tmp/ca-chain-certificate/ca-chain.cert.pem",
//"sasl.mechanisms": "PLAIN"
},
tconf: {
"request.required.acks": 1,
},
},
consumer: {
noptions: {
"metadata.broker.list": "localhost:9092",
"group.id": "zamza-base-group",
"event_cb": false,
"api.version.request": true,
"socket.keepalive.enable": true,
"socket.blocking.max.ms": 100,
"enable.auto.commit": false,
"heartbeat.interval.ms": 250,
"retry.backoff.ms": 250,
"fetch.min.bytes": 100,
"fetch.message.max.bytes": 3 * 1024 * 1024,
"queued.min.messages": 100,
"fetch.error.backoff.ms": 100,
"queued.max.messages.kbytes": 500,
"fetch.wait.max.ms": 1000,
"queue.buffering.max.ms": 1000,
"batch.num.messages": 45000,
//"security.protocol": "sasl_ssl",
//"ssl.key.location": "/tmp/kafka-clients-key/service-client.key.pem",
//"ssl.certificate.location": "/tmp/kafka-clients-certificate/service-client.cert.pem",
//"ssl.ca.location": "/tmp/ca-chain-certificate/ca-chain.cert.pem",
//"sasl.mechanisms": "PLAIN"
},
tconf: {
"auto.offset.reset": "earliest",
},
},
batchOptions: {
batchSize: 2500,
commitEveryNBatch: 1,
concurrency: 1,
commitSync: false,
noBatchCommits: false,
},
},
marshallForInvalidCharacters: false,
discovery: {
enabled: true,
scanMs: 48000,
topicBlacklist: [],
},
mongo: {
url: "mongodb://localhost:27017/zamza_base",
options: {
keepAlive: 120,
autoIndex: true,
reconnectTries: Number.MAX_VALUE,
reconnectInterval: 500,
poolSize: 20,
},
},
http: {
port: 1912,
access: "*",
},
jobs: {
topicConfigPollingMs: 15000,
metadataFetcherMs: 39 * 60 * 1000,
},
hooks: {
enabled: true,
timeout: 1500,
only: false,
retries: 2,
retryTimeoutMs: 1000,
subscriptionConcurrency: 4,
replayConcurrency: 4,
},
};