Skip to content
This repository has been archived by the owner on Nov 11, 2021. It is now read-only.

Commit

Permalink
Kafka auto commits can now also be set to undefined via env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasK33 committed Feb 24, 2021
1 parent 40c37a8 commit c932705
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 13 deletions.
2 changes: 1 addition & 1 deletion devops/kubernetes/src/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ export class Cluster extends Chart {
numberOfInstances: 3,
teamId: "fortify",
volume: {
size: "5Gi",
size: "10Gi",
},
users: {
fortify: ["SUPERUSER", "CREATEDB"],
Expand Down
4 changes: 2 additions & 2 deletions devops/kubernetes/src/fortify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,8 @@ export class Fortify extends Chart {
configmaps: [redisConfig, kafkaConfig, postgresConfig, vaultConfig],
resources: {
limits: {
cpu: "0.2",
memory: "256Mi",
cpu: "1",
memory: "512Mi",
},
requests: {
cpu: "0.1",
Expand Down
4 changes: 2 additions & 2 deletions services/fsm/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion services/fsm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fsm",
"version": "1.14.8",
"version": "1.14.9",
"description": "Finite State Machine",
"author": {
"name": "Thomas Kosiewski"
Expand Down
10 changes: 8 additions & 2 deletions services/fsm/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,14 @@ const {

await consumer.run({
autoCommit: KAFKA_AUTO_COMMIT !== "false",
autoCommitInterval: parseInt(KAFKA_AUTO_COMMIT_INTERVAL),
autoCommitThreshold: parseInt(KAFKA_AUTO_COMMIT_THRESHOLD),
autoCommitInterval:
KAFKA_AUTO_COMMIT_INTERVAL === "undefined"
? undefined
: parseInt(KAFKA_AUTO_COMMIT_INTERVAL),
autoCommitThreshold:
KAFKA_AUTO_COMMIT_THRESHOLD === "undefined"
? undefined
: parseInt(KAFKA_AUTO_COMMIT_THRESHOLD),
eachBatchAutoResolve: KAFKA_EACH_BATCH_AUTO_RESOLVE !== "false",
eachBatch: async ({
batch,
Expand Down
4 changes: 2 additions & 2 deletions services/historization/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion services/historization/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "historization",
"version": "1.12.10",
"version": "1.12.11",
"description": "A historization service responsible for persisting info",
"author": {
"name": "Thomas Kosiewski"
Expand Down
10 changes: 8 additions & 2 deletions services/historization/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,14 @@ const {

await consumer.run({
autoCommit: KAFKA_AUTO_COMMIT !== "false",
autoCommitInterval: parseInt(KAFKA_AUTO_COMMIT_INTERVAL),
autoCommitThreshold: parseInt(KAFKA_AUTO_COMMIT_THRESHOLD),
autoCommitInterval:
KAFKA_AUTO_COMMIT_INTERVAL === "undefined"
? undefined
: parseInt(KAFKA_AUTO_COMMIT_INTERVAL),
autoCommitThreshold:
KAFKA_AUTO_COMMIT_THRESHOLD === "undefined"
? undefined
: parseInt(KAFKA_AUTO_COMMIT_THRESHOLD),
eachBatchAutoResolve: KAFKA_EACH_BATCH_AUTO_RESOLVE !== "false",
eachBatch: async ({
batch,
Expand Down

0 comments on commit c932705

Please sign in to comment.