All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.infusers.core.email.kafka.KafkaConsumer Maven / Gradle / Ivy

There is a newer version: 2024.12.0008
Show newest version
/*package com.infusers.core.email.kafka;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

import com.infusers.core.email.EmailMessage;
import com.infusers.core.email.RemoteEmailUtility;

@Component
public class KafkaConsumer {
	
	final Logger log = LogManager.getLogger(KafkaConsumer.class);
	private static final String CLASS_NAME = "KafkaConsumer";
	
    @Value("${kafka.consumer.topic}")
    private String topic;

    @Value("${kafka.consumer.group-id}")
    private String groupId;
	
	@Value("${infusers.token.inter.api.communication}")
	private String infuserTokenInterApiCommunication;
    

    @KafkaListener(topics = "${kafka.consumer.topic}", groupId = "${kafka.consumer.group-id}")
    public void receiveMessage(EmailMessage eMessage) {
    	boolean success = RemoteEmailUtility.sendEmail(log, eMessage);
		log.debug(CLASS_NAME+".sendEmail() success = "+success+" :: EmailMessage = "+eMessage);    	
    }
}
*/





© 2015 - 2025 Weber Informatics LLC | Privacy Policy