@UriEndpoint(firstVersion="2.13.0",
scheme="kafka",
title="Kafka",
syntax="kafka:topic",
category=MESSAGING)
public class KafkaEndpoint
extends org.apache.camel.support.DefaultEndpoint
implements org.apache.camel.MultipleConsumersSupport
Constructor and Description |
---|
KafkaEndpoint() |
KafkaEndpoint(String endpointUri,
KafkaComponent component) |
Modifier and Type | Method and Description |
---|---|
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor) |
ExecutorService |
createExecutor() |
org.apache.camel.Producer |
createProducer() |
protected KafkaProducer |
createProducer(KafkaEndpoint endpoint) |
ExecutorService |
createProducerExecutor() |
protected void |
doBuild() |
KafkaComponent |
getComponent() |
KafkaConfiguration |
getConfiguration() |
KafkaClientFactory |
getKafkaClientFactory() |
KafkaManualCommitFactory |
getKafkaManualCommitFactory() |
boolean |
isMultipleConsumersSupported() |
void |
setConfiguration(KafkaConfiguration configuration) |
void |
setKafkaClientFactory(KafkaClientFactory kafkaClientFactory)
Factory to use for creating
KafkaConsumer and
KafkaProducer instances. |
void |
setKafkaManualCommitFactory(KafkaManualCommitFactory kafkaManualCommitFactory)
Factory to use for creating
KafkaManualCommit instances. |
void |
updateClassProperties(Properties props) |
configureConsumer, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, doStart, doStop, equals, getCamelContext, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toString
build, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public KafkaEndpoint()
public KafkaEndpoint(String endpointUri, KafkaComponent component)
public KafkaComponent getComponent()
getComponent
in class org.apache.camel.support.DefaultEndpoint
public KafkaConfiguration getConfiguration()
public void setConfiguration(KafkaConfiguration configuration)
public KafkaClientFactory getKafkaClientFactory()
public void setKafkaClientFactory(KafkaClientFactory kafkaClientFactory)
KafkaConsumer
and
KafkaProducer
instances. This allows to configure a custom factory to
create instances with logic that extends the vanilla Kafka clients.public KafkaManualCommitFactory getKafkaManualCommitFactory()
public void setKafkaManualCommitFactory(KafkaManualCommitFactory kafkaManualCommitFactory)
KafkaManualCommit
instances. This allows to plugin a custom factory to create
custom KafkaManualCommit
instances in case special logic is needed when doing manual commits that
deviates from the default implementation that comes out of the box.protected void doBuild() throws Exception
doBuild
in class org.apache.camel.support.service.BaseService
Exception
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
createConsumer
in interface org.apache.camel.Endpoint
Exception
public org.apache.camel.Producer createProducer() throws Exception
createProducer
in interface org.apache.camel.Endpoint
Exception
public boolean isMultipleConsumersSupported()
isMultipleConsumersSupported
in interface org.apache.camel.MultipleConsumersSupport
public void updateClassProperties(Properties props)
public ExecutorService createExecutor()
public ExecutorService createProducerExecutor()
protected KafkaProducer createProducer(KafkaEndpoint endpoint)
Apache Camel