// Path: core/src/java/com/strategicgains/eventing/EventHandler.java
// public interface EventHandler
// {
// 	/**
// 	 * Process the given event. Called by the EventMonitor when an event occurs.
// 	 * 
// 	 * @param event
// 	 * @throws Exception if something goes wrong
// 	 */
// 	public void handle(Object event)
// 	throws Exception;
// 	
// 	/**
// 	 * Answers whether this EventHandler can handle events of the given type.
// 	 * If true is returned, the EventMonitor will call handle(), otherwise,
// 	 * the EventMonitor will not ask this event handler to process the event.
// 	 * 
// 	 * @param eventClass
// 	 * @return
// 	 */
// 	public boolean handles(Class<?> eventClass);
// }
// 
// Path: core/src/java/com/strategicgains/eventing/EventTransport.java
// public interface EventTransport
// {
// 	public void publish(Object event);
//     public boolean subscribe(EventHandler handler);
//     public boolean unsubscribe(EventHandler handler);
// 	public void shutdown();
// }


import java.util.Properties;
import java.util.concurrent.Future;
import org.apache.kafka.clients.producer.KafkaProducer;
import org.apache.kafka.clients.producer.Producer;
import org.apache.kafka.clients.producer.ProducerRecord;
import org.apache.kafka.clients.producer.RecordMetadata;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.strategicgains.eventing.EventHandler;
import com.strategicgains.eventing.EventTransport;
	}

	public KafkaEventTransport(Properties config, String topic, ObjectMapper mapper)
	{
		this.producer = new KafkaProducer<>(config);
		this.topic = topic;
		this.mapper = mapper;
	}

	@Override
	public void publish(Object event)
	{
		try
		{
			Future<RecordMetadata> f = producer.send(new ProducerRecord<String, String>(topic, System.currentTimeMillis() + "", mapper.writeValueAsString(event)));
		}
		catch (JsonProcessingException e)
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	@Override
	public boolean subscribe(EventHandler handler)
	{
		return false;
	}

	@Override
// Path: core/src/java/com/strategicgains/eventing/EventHandler.java
// public interface EventHandler
// {
// 	/**
// 	 * Process the given event. Called by the EventMonitor when an event occurs.
// 	 * 
// 	 * @param event
// 	 * @throws Exception if something goes wrong
// 	 */
// 	public void handle(Object event)
// 	throws Exception;
// 	
// 	/**
// 	 * Answers whether this EventHandler can handle events of the given type.
// 	 * If true is returned, the EventMonitor will call handle(), otherwise,
// 	 * the EventMonitor will not ask this event handler to process the event.
// 	 * 
// 	 * @param eventClass
// 	 * @return
// 	 */
// 	public boolean handles(Class<?> eventClass);
// }
// 
// Path: core/src/java/com/strategicgains/eventing/EventTransport.java
// public interface EventTransport
// {
// 	public void publish(Object event);
//     public boolean subscribe(EventHandler handler);
//     public boolean unsubscribe(EventHandler handler);
// 	public void shutdown();
// }


// Path: kafka/src/main/java/com/strategicgains/eventing/kafka/KafkaEventTransport.java
import java.util.Properties;
import java.util.concurrent.Future;
import org.apache.kafka.clients.producer.KafkaProducer;
import org.apache.kafka.clients.producer.Producer;
import org.apache.kafka.clients.producer.ProducerRecord;
import org.apache.kafka.clients.producer.RecordMetadata;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.strategicgains.eventing.EventHandler;
import com.strategicgains.eventing.EventTransport;

	}

	public KafkaEventTransport(Properties config, String topic, ObjectMapper mapper)
	{
		this.producer = new KafkaProducer<>(config);
		this.topic = topic;
		this.mapper = mapper;
	}

	@Override
	public void publish(Object event)
	{
		try
		{
			Future<RecordMetadata> f = producer.send(new ProducerRecord<String, String>(topic, System.currentTimeMillis() + "", mapper.writeValueAsString(event)));
		}
		catch (JsonProcessingException e)
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	@Override
	public boolean subscribe(EventHandler handler)
	{
		return false;
	}

	@Override
	public boolean unsubscribe(EventHandler handler)