public class EventStorePublisher extends Object
| Constructor and Description |
|---|
EventStorePublisher() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
<T extends EventStoreEvent> |
publish(T event)
Publishes the given event to the Kafka topic synchronously.
|
<T extends EventStoreEvent> |
publishAsync(T event)
Publishes the given event to the Kafka topic asynchronously.
|
public <T extends EventStoreEvent> org.apache.kafka.clients.producer.RecordMetadata publish(T event)
T - event supposed to extend EventStoreEventevent - event to be publishedEventNotPublishedException - when publish of event failed this runtime exception is thrownpublic <T extends EventStoreEvent> CompletableFuture<org.apache.kafka.clients.producer.RecordMetadata> publishAsync(T event)
T - event supposed to extend EventStoreEventevent - event to be published@PreDestroy public void destroy()
Copyright © 2019. All rights reserved.