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 targetKafkaInboundGatewaySpec
implementation type.
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,DisposableBean
,FactoryBean<KafkaInboundGateway<K,V,R>>
,InitializingBean
,Lifecycle
,Phased
,SmartLifecycle
,ComponentsRegistration
- Direct Known Subclasses:
KafkaInboundGatewaySpec.KafkaInboundGatewayListenerContainerSpec
public class KafkaInboundGatewaySpec<K,V,R,S extends KafkaInboundGatewaySpec<K,V,R,S>> extends MessagingGatewaySpec<S,KafkaInboundGateway<K,V,R>> implements ComponentsRegistration
A
MessagingGatewaySpec
implementation for the KafkaInboundGateway
.- Since:
- 5.4
- Author:
- Gary Russell, Artem Bilan
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
KafkaInboundGatewaySpec.KafkaInboundGatewayListenerContainerSpec<K,V,R>
AConcurrentMessageListenerContainer
configurationKafkaInboundGatewaySpec
extension. -
Field Summary
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
PARSER, target
-
Method Summary
Modifier and Type Method Description Map<Object,String>
getComponentsToRegister()
S
messageConverter(org.springframework.kafka.support.converter.RecordMessageConverter messageConverter)
Set the message converter to use with a record-based consumer.S
onPartitionsAssignedSeekCallback(BiConsumer<Map<org.apache.kafka.common.TopicPartition,Long>,org.springframework.kafka.listener.ConsumerSeekAware.ConsumerSeekCallback> onPartitionsAssignedCallback)
Specify aBiConsumer
for seeks management duringConsumerSeekAware.onPartitionsAssigned(Map, ConsumerSeekAware.ConsumerSeekCallback)
call from theKafkaMessageListenerContainer
.S
recoveryCallback(org.springframework.retry.RecoveryCallback<? extends Object> recoveryCallback)
ARecoveryCallback
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 aRetryTemplate
instance to wrapKafkaInboundGateway.IntegrationRecordMessageListener
intoRetryingMessageListenerAdapter
.Methods inherited from class org.springframework.integration.dsl.MessagingGatewaySpec
autoStartup, errorChannel, errorChannel, errorOnTimeout, id, phase, replyChannel, replyChannel, replyMapper, replyTimeout, requestChannel, requestChannel, requestMapper, requestTimeout, shouldTrack
Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stop
Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
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 aRetryTemplate
instance to wrapKafkaInboundGateway.IntegrationRecordMessageListener
intoRetryingMessageListenerAdapter
.- Parameters:
retryTemplate
- theRetryTemplate
to use.- Returns:
- the spec
-
recoveryCallback
public S recoveryCallback(org.springframework.retry.RecoveryCallback<? extends Object> recoveryCallback)ARecoveryCallback
instance 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(BiConsumer<Map<org.apache.kafka.common.TopicPartition,Long>,org.springframework.kafka.listener.ConsumerSeekAware.ConsumerSeekCallback> onPartitionsAssignedCallback)Specify aBiConsumer
for seeks management duringConsumerSeekAware.onPartitionsAssigned(Map, ConsumerSeekAware.ConsumerSeekCallback)
call from theKafkaMessageListenerContainer
.- Parameters:
onPartitionsAssignedCallback
- theBiConsumer
to use- Returns:
- the spec
- Since:
- 3.0.4
-
getComponentsToRegister
- Specified by:
getComponentsToRegister
in interfaceComponentsRegistration
-