public class AsynchronousDeliveryStrategy extends Object implements DeliveryStrategy
| Constructor and Description |
|---|
AsynchronousDeliveryStrategy() |
| Modifier and Type | Method and Description |
|---|---|
<K,V,E> boolean |
send(org.apache.kafka.clients.producer.Producer<K,V> producer,
org.apache.kafka.clients.producer.ProducerRecord<K,V> record,
E event,
FailedDeliveryCallback<E> failedDeliveryCallback)
Sends a message to a kafka producer and somehow deals with failures.
|
public <K,V,E> boolean send(org.apache.kafka.clients.producer.Producer<K,V> producer,
org.apache.kafka.clients.producer.ProducerRecord<K,V> record,
E event,
FailedDeliveryCallback<E> failedDeliveryCallback)
DeliveryStrategysend in interface DeliveryStrategyK - the key type of a persisted log message.V - the value type of a persisted log message.E - the type of the logging event.producer - the backing kafka producerrecord - the prepared kafka message (ready to ship)event - the originating logging eventfailedDeliveryCallback - a callback that handles messages that could not be delivered with best-effort.true if the message could be sent successfully, false otherwise.Copyright © 2015–2016. All rights reserved.