public class KafkaProducer
extends org.apache.camel.support.DefaultAsyncProducer
Constructor and Description |
---|
KafkaProducer(KafkaEndpoint endpoint) |
Modifier and Type | Method and Description |
---|---|
protected Iterator<org.apache.kafka.clients.producer.ProducerRecord> |
createRecorder(org.apache.camel.Exchange exchange) |
protected void |
doStart() |
protected void |
doStop() |
org.apache.kafka.clients.producer.KafkaProducer |
getKafkaProducer() |
ExecutorService |
getWorkerPool() |
void |
process(org.apache.camel.Exchange exchange) |
boolean |
process(org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback) |
void |
setKafkaProducer(org.apache.kafka.clients.producer.KafkaProducer kafkaProducer)
To use a custom
KafkaProducer instance. |
void |
setWorkerPool(ExecutorService workerPool) |
protected Object |
tryConvertToSerializedType(org.apache.camel.Exchange exchange,
Object object,
String serializerClass)
Attempts to convert the object to the same type as the serialized class specified
|
createExchange, getEndpoint, isSingleton, toString
build, doBuild, doInit, doResume, doShutdown, doSuspend, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public KafkaProducer(KafkaEndpoint endpoint)
public org.apache.kafka.clients.producer.KafkaProducer getKafkaProducer()
public void setKafkaProducer(org.apache.kafka.clients.producer.KafkaProducer kafkaProducer)
KafkaProducer
instance.public ExecutorService getWorkerPool()
public void setWorkerPool(ExecutorService workerPool)
protected void doStart() throws Exception
doStart
in class org.apache.camel.support.DefaultProducer
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.support.DefaultProducer
Exception
protected Iterator<org.apache.kafka.clients.producer.ProducerRecord> createRecorder(org.apache.camel.Exchange exchange) throws Exception
Exception
public void process(org.apache.camel.Exchange exchange) throws Exception
process
in interface org.apache.camel.Processor
process
in class org.apache.camel.support.DefaultAsyncProducer
Exception
public boolean process(org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback)
Apache Camel