File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,11 @@ module.exports = {
99 } ,
1010 RETRY_COUNTER : 3 ,
1111 KAFKA_REPOST_COUNT : 5 ,
12+ KAFKA_URL : process . env . KAFKA_URL ,
13+ KAFKA_GROUP_ID : process . env . KAFKA_GROUP_ID || 'ifx-pg-consumer' ,
14+ KAFKA_CLIENT_CERT : process . env . KAFKA_CLIENT_CERT ? process . env . KAFKA_CLIENT_CERT . replace ( '\\n' , '\n' ) : null ,
15+ KAFKA_CLIENT_CERT_KEY : process . env . KAFKA_CLIENT_CERT_KEY ?
16+ process . env . KAFKA_CLIENT_CERT_KEY . replace ( '\\n' , '\n' ) : null ,
1217 topic_error : {
1318 NAME : 'db.ifxpgmigrate.error' ,
1419 PARTITION : 0 ,
Original file line number Diff line number Diff line change @@ -3,7 +3,16 @@ const Promise = require('bluebird');
33const config = require ( 'config' ) ;
44const logger = require ( './common/logger' ) ;
55const healthcheck = require ( 'topcoder-healthcheck-dropin' ) ;
6- const consumer = new Kafka . GroupConsumer ( ) ;
6+ const options = {
7+ groupId : config . KAFKA_GROUP_ID ,
8+ connectionString : config . KAFKA_URL ,
9+ ssl : {
10+ cert : config . KAFKA_CLIENT_CERT ,
11+ key : config . KAFKA_CLIENT_CERT_KEY
12+ }
13+ } ;
14+
15+ const consumer = new Kafka . GroupConsumer ( options ) ;
716const {
817 create_consumer_app_log,
918 consumerpg_success_log,
You can’t perform that action at this time.
0 commit comments