K
- the key type.V
- the value type.public class KafkaPublisher<K,V> extends Object
This terminal does not dispatch Events internally, as it relies on each event processor to listen to it's own Kafka Topic.
Constructor and Description |
---|
KafkaPublisher(KafkaPublisherConfiguration<K,V> config)
Initialize this instance to publish message as they are published on the given
messageSource . |
Modifier and Type | Method and Description |
---|---|
protected void |
send(List<? extends EventMessage<?>> events)
Send
events to the configured Kafka topic . |
void |
shutDown()
Shuts down this component and unsubscribes it from its messageSource.
|
void |
start()
Subscribes this publisher to the messageSource provided during initialization.
|
public KafkaPublisher(KafkaPublisherConfiguration<K,V> config)
messageSource
.config
- Publisher configuration used for initializationpublic void start()
public void shutDown()
protected void send(List<? extends EventMessage<?>> events)
events
to the configured Kafka topic
.
It takes the current Unit of Work into account when available.
If ProducerFactory
is configured to use:
KafkaPublisherConfiguration.Builder.withPublisherAckTimeout(long)
).events
- the events to publish on the Kafka broker.Copyright © 2010–2018. All rights reserved.