@Component(value="kafka")
public class KafkaComponent
extends org.apache.camel.support.DefaultComponent
implements org.apache.camel.SSLContextParametersAware
| Constructor and Description |
|---|
KafkaComponent() |
KafkaComponent(org.apache.camel.CamelContext context) |
| Modifier and Type | Method and Description |
|---|---|
protected KafkaEndpoint |
createEndpoint(String uri,
String remaining,
Map<String,Object> params) |
String |
getBrokers() |
KafkaConfiguration |
getConfiguration() |
KafkaManualCommitFactory |
getKafkaManualCommitFactory() |
ExecutorService |
getWorkerPool() |
boolean |
isAllowManualCommit() |
boolean |
isBreakOnFirstError() |
boolean |
isUseGlobalSslContextParameters() |
void |
setAllowManualCommit(boolean allowManualCommit)
Whether to allow doing manual commits via
KafkaManualCommit. |
void |
setBreakOnFirstError(boolean breakOnFirstError)
This options controls what happens when a consumer is processing an exchange and it fails.
|
void |
setBrokers(String brokers)
URL of the Kafka brokers to use.
|
void |
setConfiguration(KafkaConfiguration configuration)
Allows to pre-configure the Kafka component with common options that the endpoints will reuse.
|
void |
setKafkaManualCommitFactory(KafkaManualCommitFactory kafkaManualCommitFactory)
Factory to use for creating
KafkaManualCommit instances. |
void |
setUseGlobalSslContextParameters(boolean useGlobalSslContextParameters)
Enable usage of global SSL context parameters.
|
void |
setWorkerPool(ExecutorService workerPool)
To use a shared custom worker pool for continue routing
Exchange after kafka server has acknowledge
the message that was sent to it from KafkaProducer using asynchronous non-blocking processing. |
afterConfiguration, createEndpoint, createEndpoint, doInit, doStart, doStop, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, getComponentPropertyConfigurer, getEndpointPropertyConfigurer, getExtension, getSupportedExtensions, ifStartsWithReturnRemainder, isBasicPropertyBinding, isBridgeErrorHandler, isLazyStartProducer, preProcessUri, registerExtension, registerExtension, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, setBasicPropertyBinding, setBridgeErrorHandler, setCamelContext, setLazyStartProducer, setProperties, setProperties, useIntrospectionOnEndpoint, useRawUri, validateParameters, validateURIbuild, doBuild, doResume, doShutdown, doSuspend, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitretrieveGlobalSslContextParameterspublic KafkaComponent()
public KafkaComponent(org.apache.camel.CamelContext context)
protected KafkaEndpoint createEndpoint(String uri, String remaining, Map<String,Object> params) throws Exception
createEndpoint in class org.apache.camel.support.DefaultComponentExceptionpublic KafkaConfiguration getConfiguration()
public void setConfiguration(KafkaConfiguration configuration)
public String getBrokers()
public void setBrokers(String brokers)
public ExecutorService getWorkerPool()
public void setWorkerPool(ExecutorService workerPool)
Exchange after kafka server has acknowledge
the message that was sent to it from KafkaProducer using asynchronous non-blocking processing.
If using this option then you must handle the lifecycle of the thread pool to shut the pool down when no longer needed.public boolean isUseGlobalSslContextParameters()
isUseGlobalSslContextParameters in interface org.apache.camel.SSLContextParametersAwarepublic void setUseGlobalSslContextParameters(boolean useGlobalSslContextParameters)
setUseGlobalSslContextParameters in interface org.apache.camel.SSLContextParametersAwarepublic boolean isBreakOnFirstError()
public void setBreakOnFirstError(boolean breakOnFirstError)
public boolean isAllowManualCommit()
public void setAllowManualCommit(boolean allowManualCommit)
KafkaManualCommit.
If this option is enabled then an instance of KafkaManualCommit is stored on the Exchange message header,
which allows end users to access this API and perform manual offset commits via the Kafka consumer.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.Apache Camel