K - the key type.V - the value type.S - the target KafkaMessageDrivenChannelAdapterSpec implementation type.public class KafkaMessageDrivenChannelAdapterSpec<K,V,S extends KafkaMessageDrivenChannelAdapterSpec<K,V,S>> extends MessageProducerSpec<S,org.springframework.integration.kafka.inbound.KafkaMessageDrivenChannelAdapter<K,V>>
MessageProducerSpec implementation for the KafkaMessageDrivenChannelAdapter.| Modifier and Type | Class and Description |
|---|---|
static class |
KafkaMessageDrivenChannelAdapterSpec.KafkaMessageDrivenChannelAdapterListenerContainerSpec<K,V>
A
ConcurrentMessageListenerContainer configuration KafkaMessageDrivenChannelAdapterSpec
extension. |
static class |
KafkaMessageDrivenChannelAdapterSpec.KafkaMessageListenerContainerSpec<K,V>
A helper class in the Builder pattern style to delegate options to the
ConcurrentMessageListenerContainer. |
logger, PARSER, target| Modifier and Type | Method and Description |
|---|---|
S |
ackDiscarded(boolean ackDiscarded)
A
boolean flag to indicate if FilteringAcknowledgingMessageListenerAdapter
should acknowledge discarded records or not. |
S |
batchMessageConverter(org.springframework.kafka.support.converter.BatchMessageConverter messageConverter)
Set the message converter to use with a batch-based consumer.
|
S |
batchMode(boolean batchMode)
Deprecated.
since 1.2.1 in favor of an appropriate
KafkaMessageDrivenChannelAdapter.ListenerMode constructor argument. |
S |
filterInRetry(boolean filterInRetry)
/**
The
boolean flag to specify the order how
RetryingAcknowledgingMessageListenerAdapter and
FilteringAcknowledgingMessageListenerAdapter are wrapped to each other,
if both of them are present. |
S |
messageConverter(org.springframework.kafka.support.converter.MessageConverter messageConverter)
Set the message converter; must be a
RecordMessageConverter or
BatchMessageConverter depending on mode. |
S |
recordFilterStrategy(org.springframework.kafka.listener.adapter.RecordFilterStrategy<K,V> recordFilterStrategy)
Specify a
RecordFilterStrategy to wrap
KafkaMessageDrivenChannelAdapter.IntegrationRecordMessageListener into
FilteringAcknowledgingMessageListenerAdapter. |
S |
recordMessageConverter(org.springframework.kafka.support.converter.RecordMessageConverter messageConverter)
Set the message converter to use with a record-based consumer.
|
S |
recoveryCallback(org.springframework.retry.RecoveryCallback<java.lang.Void> recoveryCallback)
A
RecoveryCallback instance for retry operation;
if null, the exception will be thrown to the container after retries are exhausted. |
S |
retryTemplate(org.springframework.retry.support.RetryTemplate retryTemplate)
Specify a
RetryTemplate instance to wrap
KafkaMessageDrivenChannelAdapter.IntegrationRecordMessageListener into
RetryingAcknowledgingMessageListenerAdapter. |
autoStartup, errorChannel, errorChannel, id, outputChannel, outputChannel, phase_this, doGet, get, getId, getObject, getObjectType, isSingleton@Deprecated public S batchMode(boolean batchMode)
KafkaMessageDrivenChannelAdapter.ListenerMode constructor argument.boolean flag to indicate a listener mode.batchMode - enable batch mode for listener.KafkaMessageDrivenChannelAdapterpublic S messageConverter(org.springframework.kafka.support.converter.MessageConverter messageConverter)
RecordMessageConverter or
BatchMessageConverter depending on mode.messageConverter - the converter.public S recordMessageConverter(org.springframework.kafka.support.converter.RecordMessageConverter messageConverter)
messageConverter - the converter.public S batchMessageConverter(org.springframework.kafka.support.converter.BatchMessageConverter messageConverter)
messageConverter - the converter.public S recordFilterStrategy(org.springframework.kafka.listener.adapter.RecordFilterStrategy<K,V> recordFilterStrategy)
RecordFilterStrategy to wrap
KafkaMessageDrivenChannelAdapter.IntegrationRecordMessageListener into
FilteringAcknowledgingMessageListenerAdapter.recordFilterStrategy - the RecordFilterStrategy to use.public S ackDiscarded(boolean ackDiscarded)
boolean flag to indicate if FilteringAcknowledgingMessageListenerAdapter
should acknowledge discarded records or not.
Does not make sense if recordFilterStrategy(RecordFilterStrategy) isn't specified.ackDiscarded - true to ack (commit offset for) discarded messages.public S retryTemplate(org.springframework.retry.support.RetryTemplate retryTemplate)
RetryTemplate instance to wrap
KafkaMessageDrivenChannelAdapter.IntegrationRecordMessageListener into
RetryingAcknowledgingMessageListenerAdapter.retryTemplate - the RetryTemplate to use.public S recoveryCallback(org.springframework.retry.RecoveryCallback<java.lang.Void> recoveryCallback)
RecoveryCallback instance for retry operation;
if null, the exception will be thrown to the container after retries are exhausted.
Does not make sense if retryTemplate(RetryTemplate) isn't specified.recoveryCallback - the recovery callback.public S filterInRetry(boolean filterInRetry)
boolean flag to specify the order how
RetryingAcknowledgingMessageListenerAdapter and
FilteringAcknowledgingMessageListenerAdapter are wrapped to each other,
if both of them are present.
Does not make sense if only one of RetryTemplate or
RecordFilterStrategy is present, or any.filterInRetry - the order for RetryingAcknowledgingMessageListenerAdapter and
FilteringAcknowledgingMessageListenerAdapter wrapping. Defaults to false.