org.trellisldp.api.EventServicepublic class KafkaPublisher
extends java.lang.Object
implements org.trellisldp.api.EventService
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
KAFKA_TOPIC |
| Constructor | Description |
|---|---|
KafkaPublisher(org.apache.kafka.clients.producer.Producer<java.lang.String,java.lang.String> producer) |
Create a new Kafka Publisher.
|
KafkaPublisher(org.apache.kafka.clients.producer.Producer<java.lang.String,java.lang.String> producer,
java.lang.String topic) |
Create a new Kafka Publisher.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
emit(org.trellisldp.api.Event event) |
public static final java.lang.String KAFKA_TOPIC
@Inject public KafkaPublisher(org.apache.kafka.clients.producer.Producer<java.lang.String,java.lang.String> producer)
producer - the producerpublic KafkaPublisher(org.apache.kafka.clients.producer.Producer<java.lang.String,java.lang.String> producer,
java.lang.String topic)
producer - the producertopic - the name of the kafka topic