Skip to content

Commit

Permalink
config kafka authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
cauta committed May 3, 2024
1 parent fac1d74 commit 93baf59
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/apps/monitor-service/src/ethereum/ethereum.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ import { EthereumService } from './ethereum.service';
client: {
clientId: 'webhook',
brokers: process.env.KAFKA_BROKERS.split(','),
ssl: process.env.KAFKA_SSL === 'true',
sasl:
process.env.KAFKA_AUTH_ENABLE === 'true'
? {
mechanism: 'plain',
username: process.env.KAFKA_USERNAME || '',
password: process.env.KAFKA_PASSWORD || '',
}
: null,
},
consumer: {
groupId: 'webhook-consumer',
Expand Down
9 changes: 9 additions & 0 deletions app/apps/monitor-service/src/polygon/polygon.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ import { PolygonService } from './polygon.service';
client: {
clientId: 'webhook',
brokers: process.env.KAFKA_BROKERS.split(','),
ssl: process.env.KAFKA_SSL === 'true',
sasl:
process.env.KAFKA_AUTH_ENABLE === 'true'
? {
mechanism: 'plain',
username: process.env.KAFKA_USERNAME || '',
password: process.env.KAFKA_PASSWORD || '',
}
: null,
},
consumer: {
groupId: 'webhook-consumer',
Expand Down
9 changes: 9 additions & 0 deletions app/apps/onebox/src/main.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ import { PolygonPollingBlockService } from './polling.block/polygon.polling.bloc
client: {
clientId: 'worker',
brokers: process.env.KAFKA_BROKERS.split(','),
ssl: process.env.KAFKA_SSL === 'true',
sasl:
process.env.KAFKA_AUTH_ENABLE === 'true'
? {
mechanism: 'plain',
username: process.env.KAFKA_USERNAME || '',
password: process.env.KAFKA_PASSWORD || '',
}
: null,
},
producer: {},
consumer: {
Expand Down
9 changes: 9 additions & 0 deletions app/apps/worker-service/src/worker-service.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ import { PolygonWorker } from './worker/polygon.worker';
client: {
clientId: 'monitor',
brokers: process.env.KAFKA_BROKERS.split(','),
ssl: process.env.KAFKA_SSL === 'true',
sasl:
process.env.KAFKA_AUTH_ENABLE === 'true'
? {
mechanism: 'plain',
username: process.env.KAFKA_USERNAME || '',
password: process.env.KAFKA_PASSWORD || '',
}
: null,
},
producer: {},
consumer: {
Expand Down

0 comments on commit 93baf59

Please sign in to comment.