Skip to content

Commit 3c436fb

Browse files
author
sachin-maheshwari
authored
Merge pull request #134 from appirio-tech/feature/jira-plat-130
JIRA-plat-130 : shutdown legacy kafka
2 parents 4437412 + 64dbeef commit 3c436fb

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

.circleci/config.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@ install_deploysuite: &install_deploysuite
1111
git clone --branch v1.3 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
1212
cp ./../buildscript/master_deploy.sh .
1313
cp ./../buildscript/buildenv.sh .
14-
cp ./../buildscript/awsconfiguration.sh .
15-
14+
cp ./../buildscript/awsconfiguration.sh .
15+
16+
maven_configuration_v1: &maven_configuration_v1
17+
name: Configuring maven
18+
command: |
19+
sudo sed -i '/<mirror>/,/<\/mirror>/d' /opt/apache-maven/conf/settings.xml
20+
1621
build_steps: &build_steps
1722
# Initialization1.
1823
- checkout
@@ -23,7 +28,8 @@ build_steps: &build_steps
2328
sudo apt update
2429
sudo apt install jq
2530
sudo apt install awscli
26-
- setup_remote_docker
31+
- setup_remote_docker
32+
- run: *maven_configuration_v1
2733
- restore_cache:
2834
key: ap-review-microservice-{{ checksum "~/project/service/pom.xml" }}
2935
- run: mvn -f ~/project/service/pom.xml dependency:go-offline
@@ -88,12 +94,12 @@ workflows:
8894
branches:
8995
only:
9096
- dev
91-
- dev-msinteg
97+
- feature/jira-plat-130
9298
- dev-ecs
9399
- "build-prod":
94100
context : org-global
95101
filters:
96102
branches:
97103
only:
98104
- master
99-
- master-ecs
105+
- master-ecs

service/src/main/java/com/appirio/service/review/manager/ScoreManager.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ public ScoreManager() throws SupplyException {
7272
ReviewItemDAO.class);
7373
this.scoreDAO = DAOFactory.getInstance().createDAO(ScoreDAO.class);
7474
this.projectResultDAO = DAOFactory.getInstance().createDAO(ProjectResultDAO.class);
75-
this.eventProducer = EventProducer.getInstance();
75+
/**
76+
//jira-plat-130, hard cut the legacy publishing
77+
this.eventProducer = EventProducer.getInstance();
78+
*/
79+
this.eventProducer = null;
7680
}
7781

7882
/**
@@ -356,7 +360,13 @@ public void updateScores(List<ReviewItem> reviewItems, AuthUser auth) throws Exc
356360
private void publishKafkaEvent(JsonNode json, String topic) {
357361
// fire an event on to the kafka bus
358362
try {
359-
eventProducer.publish(topic, json);
363+
if (eventProducer != null) {
364+
eventProducer.publish(topic, json);
365+
} else {
366+
// jira-plat-130, hard cut the leagacy kafka
367+
368+
logger.info("jira-plat-130, hard cut the legacy publishing for topic: " + topic);
369+
}
360370
} catch (EmptyEventException e) {
361371
logger.info("Failed to publish message " + e.getMessage());
362372
} catch (EncodingEventException e) {

0 commit comments

Comments
 (0)