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 org.springframework.integration.dsl.MessageProducerSpec<S,KafkaMessageDrivenChannelAdapter<K,V>> implements org.springframework.integration.dsl.ComponentsRegistration
MessageProducerSpec implementation for the KafkaMessageDrivenChannelAdapter.| Modifier and Type | Class and Description |
|---|---|
static class |
KafkaMessageDrivenChannelAdapterSpec.KafkaMessageDrivenChannelAdapterListenerContainerSpec<K,V>
A
ConcurrentMessageListenerContainer configuration KafkaMessageDrivenChannelAdapterSpec
extension. |
| Modifier and Type | Method and Description |
|---|---|
S |
ackDiscarded(boolean ackDiscarded)
A
boolean flag to indicate if
FilteringMessageListenerAdapter
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 |
filterInRetry(boolean filterInRetry)
The
boolean flag to specify the order how
RetryingMessageListenerAdapter
and
FilteringMessageListenerAdapter
are wrapped to each other, if both of them are present. |
java.util.Map<java.lang.Object,java.lang.String> |
getComponentsToRegister() |
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
FilteringMessageListenerAdapter. |
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<? extends java.lang.Object> 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
RetryingMessageListenerAdapter. |
autoStartup, errorChannel, errorChannel, errorMessageStrategy, id, outputChannel, outputChannel, phase, sendTimeout, shouldTrackpublic 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
FilteringMessageListenerAdapter.recordFilterStrategy - the RecordFilterStrategy to use.public S ackDiscarded(boolean ackDiscarded)
boolean flag to indicate if
FilteringMessageListenerAdapter
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
RetryingMessageListenerAdapter.retryTemplate - the RetryTemplate to use.public S recoveryCallback(org.springframework.retry.RecoveryCallback<? extends java.lang.Object> 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
RetryingMessageListenerAdapter
and
FilteringMessageListenerAdapter
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
RetryingMessageListenerAdapter
and
FilteringMessageListenerAdapter
wrapping. Defaults to false.public java.util.Map<java.lang.Object,java.lang.String> getComponentsToRegister()
getComponentsToRegister in interface org.springframework.integration.dsl.ComponentsRegistration