T - The event type being published.public abstract class AbstractPublisherKafka<T> extends Object implements Publisher<T>, ServiceStatus
| Constructor and Description |
|---|
AbstractPublisherKafka(String topic)
This constructor initialises the topic.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getInitialRetryCount() |
protected void |
init()
This method initialises the publisher.
|
boolean |
isAvailable() |
void |
publish(String tenantId,
List<T> items) |
void |
publish(String tenantId,
List<T> items,
int retryCount,
long delay) |
void |
retry(String tenantId,
List<T> items,
String subscriber,
int retryCount,
long delay) |
void |
setMetricHandler(PublisherMetricHandler<T> handler) |
public AbstractPublisherKafka(String topic)
topic - The topicpublic boolean isAvailable()
isAvailable in interface ServiceStatusprotected void init()
public int getInitialRetryCount()
getInitialRetryCount in interface Publisher<T>public void publish(String tenantId, List<T> items, int retryCount, long delay) throws Exception
public void retry(String tenantId, List<T> items, String subscriber, int retryCount, long delay) throws Exception
public void setMetricHandler(PublisherMetricHandler<T> handler)
setMetricHandler in interface Publisher<T>Copyright © 2015–2017 Red Hat, Inc.. All rights reserved.