@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> parameters) |
KafkaConfiguration |
getConfiguration() |
KafkaClientFactory |
getKafkaClientFactory() |
KafkaManualCommitFactory |
getKafkaManualCommitFactory() |
PollExceptionStrategy |
getPollExceptionStrategy() |
boolean |
isUseGlobalSslContextParameters() |
void |
setConfiguration(KafkaConfiguration configuration)
Allows to pre-configure the Kafka component with common options that the endpoints will reuse.
|
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 |
setPollExceptionStrategy(PollExceptionStrategy pollExceptionStrategy)
To use a custom strategy with the consumer to control how to handle exceptions thrown from the Kafka broker while
pooling messages.
|
void |
setUseGlobalSslContextParameters(boolean useGlobalSslContextParameters)
Enable usage of global SSL context parameters.
|
afterConfiguration, createEndpoint, createEndpoint, doBuild, doInit, doStart, doStop, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, getComponentPropertyConfigurer, getDefaultName, getEndpointPropertyConfigurer, getExtension, getSupportedExtensions, ifStartsWithReturnRemainder, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, registerExtension, registerExtension, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, resolveRawParameterValues, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setLazyStartProducer, setProperties, setProperties, setProperties, useIntrospectionOnEndpoint, useRawUri, validateParameters, validateURIbuild, 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, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitretrieveGlobalSslContextParametersgetCamelContext, setCamelContext, trySetCamelContextpublic KafkaComponent()
public KafkaComponent(org.apache.camel.CamelContext context)
protected KafkaEndpoint createEndpoint(String uri, String remaining, Map<String,Object> parameters) throws Exception
createEndpoint in class org.apache.camel.support.DefaultComponentExceptionpublic KafkaConfiguration getConfiguration()
public void setConfiguration(KafkaConfiguration configuration)
public boolean isUseGlobalSslContextParameters()
isUseGlobalSslContextParameters in interface org.apache.camel.SSLContextParametersAwarepublic void setUseGlobalSslContextParameters(boolean useGlobalSslContextParameters)
setUseGlobalSslContextParameters in interface org.apache.camel.SSLContextParametersAwarepublic 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.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 PollExceptionStrategy getPollExceptionStrategy()
public void setPollExceptionStrategy(PollExceptionStrategy pollExceptionStrategy)
Apache Camel