Changes to pom.xml
Add new digit nexus repo under <
repositories
> tag<repository> <id>repo.digit.org</id> <name>eGov DIGIT Releases Repository</name> <url><https://nexus-repo.digit.org/nexus/content/repositories/snapshots/</url>> </repository>
Add Tracer 2.1.0
<dependency> <groupId>org.egov.services</groupId> <artifactId>tracer</artifactId> <version>2.1.0-SNAPSHOT</version> </dependency>
Update the Kafka producer in the service with the following code to enable the service to post to a tenant(namespace) specific topic based on the tenant-id.
@Service @Slf4j public class Producer { @Autowired private CustomKafkaTemplate<String, Object> kafkaTemplate; @Autowired private PropertyConfiguration configs; public void push(String tenantId, String topic, Object value) { String updatedTopic = topic; if (configs.getIsEnvironmentCentralInstance()) { String[] tenants = tenantId.split("\\."); if (tenants.length > 1) updatedTopic = tenants[1].concat("-").concat(topic); } log.info("The Kafka topic for the tenantId : " + tenantId + " is : " + updatedTopic); kafkaTemplate.send(updatedTopic, value); } }
The host of the MDMS services referred by any service should be changed to the internal gateway host for tenant-based(namespace) redirection. Since multiple MDMS services will be running each for the different namespaces (schemas).
- name: EGOV_MDMS_HOST valueFrom: configMapKeyRef: name: egov-service-host key: internal-gateway
{ ADD if any new configs }