public class KafkaEventService extends Object implements EventService
Modifier and Type | Field and Description |
---|---|
static String |
CONFIG_KAFKA_TOPIC
The configuration key controlling the name of the kafka topic.
|
Constructor and Description |
---|
KafkaEventService()
Create a new Kafka Event Service with a no-op serializer.
|
KafkaEventService(EventSerializationService serializer)
Create a new Kafka Event Service.
|
KafkaEventService(EventSerializationService serializer,
Producer<String,String> producer)
Create a new Kafka Event Service.
|
KafkaEventService(EventSerializationService serializer,
Producer<String,String> producer,
String topic)
Create a new Kafka Event Service.
|
public static final String CONFIG_KAFKA_TOPIC
public KafkaEventService()
@Inject public KafkaEventService(EventSerializationService serializer)
serializer
- the event serializerpublic KafkaEventService(EventSerializationService serializer, Producer<String,String> producer)
serializer
- the event serializerproducer
- the producerpublic KafkaEventService(EventSerializationService serializer, Producer<String,String> producer, String topic)
serializer
- the event serializerproducer
- the producertopic
- the name of the kafka topicpublic void emit(Event event)
EventService
emit
in interface EventService
event
- the event