Class KafkaInboundGatewaySpec<K,V,R,S extends KafkaInboundGatewaySpec<K,V,R,S>>
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,G>
org.springframework.integration.dsl.MessagingGatewaySpec<S,KafkaInboundGateway<K,V,R>>
org.springframework.integration.kafka.dsl.KafkaInboundGatewaySpec<K,V,R,S>
- Type Parameters:
K- the key type.V- the request value type.R- the reply value type.S- the targetKafkaInboundGatewaySpecimplementation type.
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanClassLoaderAware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.FactoryBean<KafkaInboundGateway<K,V,R>>,org.springframework.beans.factory.InitializingBean,org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle,org.springframework.integration.dsl.ComponentsRegistration
- Direct Known Subclasses:
KafkaInboundGatewaySpec.KafkaInboundGatewayListenerContainerSpec
public class KafkaInboundGatewaySpec<K,V,R,S extends KafkaInboundGatewaySpec<K,V,R,S>> extends org.springframework.integration.dsl.MessagingGatewaySpec<S,KafkaInboundGateway<K,V,R>> implements org.springframework.integration.dsl.ComponentsRegistration
A
MessagingGatewaySpec implementation for the KafkaInboundGateway.- Since:
- 5.4
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classKafkaInboundGatewaySpec.KafkaInboundGatewayListenerContainerSpec<K,V,R>AConcurrentMessageListenerContainerconfigurationKafkaInboundGatewaySpecextension. -
Field Summary
-
Method Summary
Modifier and Type Method Description java.util.Map<java.lang.Object,java.lang.String>getComponentsToRegister()SmessageConverter(org.springframework.kafka.support.converter.RecordMessageConverter messageConverter)Set the message converter to use with a record-based consumer.SonPartitionsAssignedSeekCallback(java.util.function.BiConsumer<java.util.Map<org.apache.kafka.common.TopicPartition,java.lang.Long>,org.springframework.kafka.listener.ConsumerSeekAware.ConsumerSeekCallback> onPartitionsAssignedCallback)Specify aBiConsumerfor seeks management duringConsumerSeekAware.onPartitionsAssigned(Map, ConsumerSeekAware.ConsumerSeekCallback)call from theKafkaMessageListenerContainer.SrecoveryCallback(org.springframework.retry.RecoveryCallback<?> recoveryCallback)ARecoveryCallbackinstance for retry operation; if null, the exception will be thrown to the container after retries are exhausted.SretryTemplate(org.springframework.retry.support.RetryTemplate retryTemplate)Specify aRetryTemplateinstance to wrapKafkaInboundGateway.IntegrationRecordMessageListenerintoRetryingMessageListenerAdapter.Methods inherited from class org.springframework.integration.dsl.MessagingGatewaySpec
autoStartup, errorChannel, errorChannel, errorOnTimeout, id, phase, replyChannel, replyChannel, replyMapper, replyTimeout, requestChannel, requestChannel, requestMapper, requestTimeout, shouldTrackMethods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stop
-
Method Details
-
messageConverter
public S messageConverter(org.springframework.kafka.support.converter.RecordMessageConverter messageConverter)Set the message converter to use with a record-based consumer.- Parameters:
messageConverter- the converter.- Returns:
- the spec
-
retryTemplate
Specify aRetryTemplateinstance to wrapKafkaInboundGateway.IntegrationRecordMessageListenerintoRetryingMessageListenerAdapter.- Parameters:
retryTemplate- theRetryTemplateto use.- Returns:
- the spec
-
recoveryCallback
ARecoveryCallbackinstance for retry operation; if null, the exception will be thrown to the container after retries are exhausted. Does not make sense ifretryTemplate(RetryTemplate)isn't specified.- Parameters:
recoveryCallback- the recovery callback.- Returns:
- the spec
-
onPartitionsAssignedSeekCallback
public S onPartitionsAssignedSeekCallback(java.util.function.BiConsumer<java.util.Map<org.apache.kafka.common.TopicPartition,java.lang.Long>,org.springframework.kafka.listener.ConsumerSeekAware.ConsumerSeekCallback> onPartitionsAssignedCallback)Specify aBiConsumerfor seeks management duringConsumerSeekAware.onPartitionsAssigned(Map, ConsumerSeekAware.ConsumerSeekCallback)call from theKafkaMessageListenerContainer.- Parameters:
onPartitionsAssignedCallback- theBiConsumerto use- Returns:
- the spec
-
getComponentsToRegister
public java.util.Map<java.lang.Object,java.lang.String> getComponentsToRegister()- Specified by:
getComponentsToRegisterin interfaceorg.springframework.integration.dsl.ComponentsRegistration
-