public class KafkaComponent
extends org.apache.camel.impl.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, createComponentConfiguration, createConfiguration, createEndpoint, doStart, doStop, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, getExtension, getSupportedExtensions, ifStartsWithReturnRemainder, isResolvePropertyPlaceholders, preProcessUri, registerExtension, registerExtension, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, setCamelContext, setProperties, setProperties, setResolvePropertyPlaceholders, useIntrospectionOnEndpoint, useRawUri, validateParameters, validateURI
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public 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.impl.DefaultComponent
Exception
public 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.SSLContextParametersAware
public void setUseGlobalSslContextParameters(boolean useGlobalSslContextParameters)
setUseGlobalSslContextParameters
in interface org.apache.camel.SSLContextParametersAware
public 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