-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaccount-balance.tf
121 lines (111 loc) · 3.78 KB
/
account-balance.tf
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# tflint-ignore: terraform_naming_convention
resource "kafka_topic" "sledger-eqdb-loader-events" {
name = "sledger-eqdb-loader.events"
replication_factor = 3
partitions = 10
}
# tflint-ignore: terraform_naming_convention
resource "kafka_topic" "finance-ledger-entries" {
name = "finance-ledger-entries"
replication_factor = 3
partitions = 10
}
# tflint-ignore: terraform_naming_convention
resource "kafka_topic" "account-balance-diff-events" {
name = "account-balance-diff.events"
replication_factor = 3
partitions = 10
}
# tflint-ignore: terraform_naming_convention
resource "kafka_topic" "finance-sledger-transaction-events" {
name = "finance-sledger-transaction-events"
replication_factor = 3
partitions = 10
config = {
"retention.bytes" = "-1"
"retention.ms" = "2592000000"
"cleanup.policy" = "delete"
}
}
# tflint-ignore: terraform_naming_convention
resource "kafka_topic" "invalid-sledger-fabricated-txs" {
name = "invalid-sledger-fabricated-txs"
replication_factor = 3
partitions = 10
config = {
"retention.bytes" = "-1"
"retention.ms" = "2592000000"
"cleanup.policy" = "delete"
}
}
# tflint-ignore: terraform_naming_convention
resource "kafka_topic" "billing-engine-events-spread-50-filtered-all" {
name = "billing-engine-events-spread-50-filtered-all"
replication_factor = 3
partitions = 50
config = {
"retention.bytes" = "-1"
"retention.ms" = "-1"
"compression.type" = "snappy"
"cleanup.policy" = "delete"
"max.message.bytes" = "104857600"
}
}
# tflint-ignore: terraform_naming_convention
resource "kafka_topic" "account-balance-change-v1-events" {
name = "account-balance-change.v1-events"
partitions = 10
replication_factor = 3
config = {
"cleanup.policy" = "delete"
"retention.bytes" = "-1"
"retention.ms" = "604800000"
}
}
# tflint-ignore: terraform_naming_convention
resource "kafka_topic" "projected-account-balance-change-v1-events" {
name = "projected-account-balance-change.v1-events"
partitions = 10
replication_factor = 3
config = {
"cleanup.policy" = "delete"
"retention.bytes" = "-1"
"retention.ms" = "604800000"
}
}
# tflint-ignore: terraform_naming_convention
resource "kafka_topic" "account-balance-errors" {
name = "account-balance.errors"
partitions = 10
replication_factor = 3
}
# tflint-ignore: terraform_naming_convention
resource "kafka_topic" "projected-account-balance-change-v1-events-complete" {
name = "projected-account-balance-change.v1-events.complete"
partitions = 10
replication_factor = 3
config = {
"cleanup.policy" = "delete"
"retention.bytes" = "-1"
"retention.ms" = "604800000"
}
}
resource "kafka_topic" "account_balance_events_compacted" {
name = "account-balance-events-compacted"
partitions = 10
replication_factor = 3
config = {
"cleanup.policy" = "compact"
"max.message.bytes" = "104857600"
# maximum time a message will remain ineligible for compaction in the log
"max.compaction.lag.ms" = "172800000" # 2 days
# how frequently the log compactor will attempt to clean the log
"min.cleanable.dirty.ratio" = "0.5" # avoid cleaning a log where more than 50% of the log has been compacted
# period of time after which Kafka will force the log to roll even if the segment file isn't full
"segment.ms" = "604800000" # 7 days
# the segment file size for the log
"segment.bytes" = "524288000" # 500MB
# time to retain delete tombstone markers for log compacted topics
"delete.retention.ms" = "86400000" # 1 day
}
}