Skip to content

Commit

Permalink
Adjust retention times too (#552)
Browse files Browse the repository at this point in the history
* Adjust retention times too

* Adjust account_identity_account_management_events config
  • Loading branch information
matiit authored Sep 24, 2024
1 parent faec101 commit d975c34
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
17 changes: 8 additions & 9 deletions prod-aws/kafka-shared-msk/account-identity/account.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,15 @@ resource "kafka_topic" "account_identity_public_account_events" {

resource "kafka_topic" "account_identity_account_management_events" {
config = {
"cleanup.policy" = "compact"
"cleanup.policy" = "delete"
"compression.type" = "zstd"

# compaction lag of 7 days
"max.compaction.lag.ms" = "604800000"
# infinite retention
"retention.ms" = "-1"
# keep data in hot storage for 1 day
"local.retention.ms" = "86400000"
# enable remote storage
"remote.storage.enable" = "true"
}
name = "account-identity.account-management-events-green"
partitions = 15
partitions = 1
replication_factor = 3
}

Expand Down Expand Up @@ -124,8 +123,8 @@ resource "kafka_topic" "account_identity_address_lookup_analytics_v1" {
resource "kafka_topic" "account_identity_analytics_bill_change_events" {
config = {
"compression.type" = "zstd"
# infinite retention
"retention.ms" = "-1"
# keep data for 7 days
"retention.ms" = "604800000"
# keep data in hot storage for 1 day
"local.retention.ms" = "86400000"
# enable remote storage
Expand Down
12 changes: 6 additions & 6 deletions prod-aws/kafka-shared-msk/account-identity/exceptions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ resource "kafka_topic" "account_identity_supply_address_debt_exception_check_eve
"remote.storage.enable" = "true"
# keep data in hot storage for 1 day
"local.retention.ms" = "86400000"
# infinite retention
"retention.ms" = "-1"
# keep data for 7 days
"retention.ms" = "604800000"
"compression.type" = "zstd"
}
name = "account-identity.supply.address.debt.exception.check.events"
Expand All @@ -52,8 +52,8 @@ resource "kafka_topic" "account_identity_correspondence_address_exception_check_
"remote.storage.enable" = "true"
# keep data in hot storage for 1 day
"local.retention.ms" = "86400000"
# infinite retention
"retention.ms" = "-1"
# keep data for 7 days
"retention.ms" = "604800000"
"compression.type" = "zstd"
}
name = "account-identity.correspondence.address.exception.check.events"
Expand Down Expand Up @@ -83,8 +83,8 @@ resource "kafka_topic" "account_identity_correspondence_address_debt_exception_c
"remote.storage.enable" = "true"
# keep data in hot storage for 1 day
"local.retention.ms" = "86400000"
# infinite retention
"retention.ms" = "-1"
# keep data for 7 days
"retention.ms" = "604800000"
"compression.type" = "zstd"
}
name = "account-identity.correspondence.address.debt.exception.check.events"
Expand Down

0 comments on commit d975c34

Please sign in to comment.