Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Changes to pom.xml

  1. 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>

  2. Add Tracer 2.1.0

    <dependency>
      <groupId>org.egov.services</groupId>
      <artifactId>tracer</artifactId>
      <version>2.1.0-SNAPSHOT</version>
    </dependency>

  3. 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);
    	}
    } 

  4. 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


  5. { ADD if any new configs }

  • No labels