Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Add new digit nexus repo under <repositories> tag

    Code Block
    <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

    Code Block
    <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.

    Code Block
    languagejava
    @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).

    Code Block
      - name: EGOV_MDMS_HOST
        valueFrom:
          configMapKeyRef:
            name: egov-service-host
            key: internal-gateway


  4. { ADD if any new configs }

...