Skip to content

Commit

Permalink
Remove Filtered TMC Topic deposit from Asn1DecodedDataRouter, TimDepo…
Browse files Browse the repository at this point in the history
…sitController
  • Loading branch information
mwodahl committed Oct 11, 2024
1 parent 286f170 commit aa57462
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,6 @@ public Object process(String consumedData) {
// Send all TIMs also to OdeTimJson
timProducer.send(odeProperties.getKafkaTopicOdeTimJson(), getRecord().key(), odeTimData);
logger.debug("Submitted to TIM Pojo topic");
// If the TIM was generated by the TMC broadcast to the filtered TMC TIM Kafka topic
try {
String generatedBy = (new JSONObject(odeTimData)).getJSONObject("metadata")
.getString("recordGeneratedBy");
if (generatedBy.equalsIgnoreCase("TMC_VIA_SAT") || generatedBy.equalsIgnoreCase("TMC_VIA_SNMP")) {
timProducer.send(odeProperties.getKafkaTopicOdeTimJsonTMCFiltered(), null, odeTimData);
}
} catch (Exception e) {
logger.error("Error while checking recordGeneratedBy field: {}", e.getMessage());
}
} else if (messageId == J2735DSRCmsgID.SPATMessage.getMsgID()) {
String odeSpatData = OdeSpatDataCreatorHelper.createOdeSpatData(consumedData).toString();
if (recordType == RecordType.dnMsg) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,16 +202,6 @@ public synchronized ResponseEntity<String> depositTim(String jsonString, Request
String obfuscatedTimData = TimTransmogrifier.obfuscateRsuPassword(odeTimData.toJson());
stringMsgProducer.send(odeProperties.getKafkaTopicOdeTimBroadcastJson(), null, obfuscatedTimData);

// If the TIM was generated by the TMC broadcast to the filtered TMC TIM Kafka topic
try {
String generatedBy = (new JSONObject(obfuscatedTimData)).getJSONObject("metadata").getString("recordGeneratedBy");
if (generatedBy.equalsIgnoreCase("TMC")) {
stringMsgProducer.send(odeProperties.getKafkaTopicOdeTimJsonTMCFiltered(), null, obfuscatedTimData);
}
} catch (Exception e) {
logger.error("Error while checking recordGeneratedBy field: {}", e.getMessage());
}

// Now that the message gas been published to OdeBradcastTim topic, it should be
// changed to J2735BroadcastTim serialId
timMetadata.setSerialId(serialIdJ2735);
Expand Down

0 comments on commit aa57462

Please sign in to comment.