Class KafkaMessageChannelBinder

java.lang.Object
org.springframework.cloud.stream.binder.AbstractBinder<org.springframework.messaging.MessageChannel,C,P>
org.springframework.cloud.stream.binder.AbstractMessageChannelBinder<org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties>,org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties>,org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner>
org.springframework.cloud.stream.binder.kafka.KafkaMessageChannelBinder
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.cloud.stream.binder.Binder<org.springframework.messaging.MessageChannel,org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties>,org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties>>, org.springframework.cloud.stream.binder.ExtendedBindingProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties,org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties>, org.springframework.cloud.stream.binder.ExtendedPropertiesBinder<org.springframework.messaging.MessageChannel,org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties,org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties>, org.springframework.cloud.stream.binder.PollableConsumerBinder<org.springframework.messaging.MessageHandler,org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties>>, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationEventPublisherAware

public class KafkaMessageChannelBinder extends org.springframework.cloud.stream.binder.AbstractMessageChannelBinder<org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties>,org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties>,org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner> implements org.springframework.cloud.stream.binder.ExtendedPropertiesBinder<org.springframework.messaging.MessageChannel,org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties,org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties>
A Binder that uses Kafka as the underlying middleware.
Author:
Eric Bottard, Marius Bogoevici, Ilayaperumal Gopinathan, David Turanski, Gary Russell, Mark Fisher, Soby Chacko, Henryk Konsek, Doug Saus, Lukasz Kaminski, Taras Danylchuk, Yi Liu, Chris Bono, Byungjun You, Oliver Führer, Omer Celik, Didier Loiseau
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    Nested classes/interfaces inherited from class org.springframework.cloud.stream.binder.AbstractMessageChannelBinder

    org.springframework.cloud.stream.binder.AbstractMessageChannelBinder.ErrorInfrastructure, org.springframework.cloud.stream.binder.AbstractMessageChannelBinder.PolledConsumerResources
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Kafka header for x-exception-fqcn.
    static final String
    Kafka header for x-exception-message.
    static final String
    Kafka header for x-exception-stacktrace.
    static final String
    Kafka header for x-original-offset.
    static final String
    Kafka header for x-original-partition.
    static final String
    Kafka header for x-original-timestamp.
    static final String
    Kafka header for x-original-timestamp-type.
    static final String
    Kafka header for x-original-topic.

    Fields inherited from class org.springframework.cloud.stream.binder.AbstractMessageChannelBinder

    provisioningProvider

    Fields inherited from class org.springframework.cloud.stream.binder.AbstractBinder

    logger
  • Constructor Summary

    Constructors
    Constructor
    Description
    KafkaMessageChannelBinder(org.springframework.cloud.stream.binder.kafka.properties.KafkaBinderConfigurationProperties configurationProperties, org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner provisioningProvider)
     
    KafkaMessageChannelBinder(org.springframework.cloud.stream.binder.kafka.properties.KafkaBinderConfigurationProperties configurationProperties, org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner provisioningProvider, org.springframework.cloud.stream.config.ListenerContainerCustomizer<org.springframework.kafka.listener.AbstractMessageListenerContainer<?,?>> containerCustomizer, KafkaBindingRebalanceListener rebalanceListener)
     
    KafkaMessageChannelBinder(org.springframework.cloud.stream.binder.kafka.properties.KafkaBinderConfigurationProperties configurationProperties, org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner provisioningProvider, org.springframework.cloud.stream.config.ListenerContainerCustomizer<org.springframework.kafka.listener.AbstractMessageListenerContainer<?,?>> containerCustomizer, org.springframework.cloud.stream.config.MessageSourceCustomizer<org.springframework.integration.kafka.inbound.KafkaMessageSource<?,?>> sourceCustomizer, KafkaBindingRebalanceListener rebalanceListener, org.springframework.cloud.stream.binder.kafka.utils.DlqPartitionFunction dlqPartitionFunction, org.springframework.cloud.stream.binder.kafka.utils.DlqDestinationResolver dlqDestinationResolver)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    addConsumerConfigCustomizer(org.springframework.cloud.stream.binder.kafka.support.ConsumerConfigCustomizer consumerConfigCustomizer)
     
    void
    addProducerConfigCustomizer(org.springframework.cloud.stream.binder.kafka.support.ProducerConfigCustomizer producerConfigCustomizer)
     
    protected org.springframework.integration.core.MessageProducer
    createConsumerEndpoint(org.springframework.cloud.stream.provisioning.ConsumerDestination destination, String group, org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties> extendedConsumerProperties)
     
    protected org.springframework.kafka.core.ConsumerFactory<?,?>
    createKafkaConsumerFactory(boolean anonymous, String consumerGroup, org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties> consumerProperties, String beanName, String destination)
     
    protected org.springframework.cloud.stream.binder.AbstractMessageChannelBinder.PolledConsumerResources
    createPolledConsumerResources(String name, String group, org.springframework.cloud.stream.provisioning.ConsumerDestination destination, org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties> extendedConsumerProperties)
     
    protected org.springframework.messaging.MessageHandler
    createProducerMessageHandler(org.springframework.cloud.stream.provisioning.ProducerDestination destination, org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties> producerProperties, org.springframework.messaging.MessageChannel errorChannel)
     
    protected org.springframework.messaging.MessageHandler
    createProducerMessageHandler(org.springframework.cloud.stream.provisioning.ProducerDestination destination, org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties> producerProperties, org.springframework.messaging.MessageChannel channel, org.springframework.messaging.MessageChannel errorChannel)
     
    protected void
    customizeProducerMessageHandler(org.springframework.messaging.MessageHandler producerMessageHandler, String destinationName)
     
    protected Map<String,Object>
    Returns an unmodifiable copy of ContainerProperties associated with the destination name which corresponds to a particular binding which could be accessed under 'containerProperties' key.
     
     
    protected org.springframework.messaging.MessageHandler
    getErrorMessageHandler(org.springframework.cloud.stream.provisioning.ConsumerDestination destination, String group, org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties> properties)
     
    protected org.springframework.integration.support.ErrorMessageStrategy
     
    org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties
     
    org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties
     
    Class<? extends org.springframework.cloud.stream.binder.BinderSpecificPropertiesProvider>
     
    protected org.springframework.messaging.MessageHandler
    getPolledConsumerErrorMessageHandler(org.springframework.cloud.stream.provisioning.ConsumerDestination destination, String group, org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties> properties)
     
    protected org.springframework.kafka.core.DefaultKafkaProducerFactory<byte[],byte[]>
    getProducerFactory(String transactionIdPrefix, org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties> producerProperties, String beanName, String destination)
     
    org.springframework.kafka.core.ProducerFactory<byte[],byte[]>
    Return a reference to the binder's transaction manager's producer factory (if configured).
    protected void
     
    protected void
    postProcessOutputChannel(org.springframework.messaging.MessageChannel outputChannel, org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties> producerProperties)
     
    protected void
    postProcessPollableSource(org.springframework.cloud.stream.binder.DefaultPollableMessageSource bindingTarget)
     
    void
    setDlqDestinationResolver(org.springframework.cloud.stream.binder.kafka.utils.DlqDestinationResolver dlqDestinationResolver)
     
    void
    setDlqPartitionFunction(org.springframework.cloud.stream.binder.kafka.utils.DlqPartitionFunction dlqPartitionFunction)
     
    void
    setExtendedBindingProperties(org.springframework.cloud.stream.binder.kafka.properties.KafkaExtendedBindingProperties extendedBindingProperties)
     
    void
    setProducerListener(org.springframework.kafka.support.ProducerListener<byte[],byte[]> producerListener)
     
    void
     
    void
    setupRebalanceListener(org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties> extendedConsumerProperties, org.springframework.kafka.listener.ContainerProperties containerProperties)
     
    protected boolean
    useNativeEncoding(org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties> producerProperties)
     

    Methods inherited from class org.springframework.cloud.stream.binder.AbstractMessageChannelBinder

    afterUnbindConsumer, afterUnbindProducer, bindPollableConsumer, doBindConsumer, doBindProducer, errorsBaseName, errorsBaseName, getApplicationEventPublisher, getContainerCustomizer, getDefaultErrorMessageHandler, getErrorBridgeName, getErrorBridgeName, getErrorMessageHandlerName, getErrorRecovererName, getMessageSourceCustomizer, getPolledConsumerRecoveryCallback, registerErrorInfrastructure, registerErrorInfrastructure, setApplicationEventPublisher, setConsumerEndpointCustomizer, setContainerCustomizer, setProducerMessageHandlerCustomizer

    Methods inherited from class org.springframework.cloud.stream.binder.AbstractBinder

    afterPropertiesSet, applyPrefix, bindConsumer, bindProducer, buildRetryTemplate, constructDLQName, getApplicationContext, getBeanFactory, getBindingServiceProperties, getEvaluationContext, groupedName, setApplicationContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.cloud.stream.binder.Binder

    bindConsumer, bindProducer

    Methods inherited from interface org.springframework.cloud.stream.binder.ExtendedBindingProperties

    getBindings
  • Field Details

    • X_EXCEPTION_FQCN

      public static final String X_EXCEPTION_FQCN
      Kafka header for x-exception-fqcn.
      See Also:
    • X_EXCEPTION_STACKTRACE

      public static final String X_EXCEPTION_STACKTRACE
      Kafka header for x-exception-stacktrace.
      See Also:
    • X_EXCEPTION_MESSAGE

      public static final String X_EXCEPTION_MESSAGE
      Kafka header for x-exception-message.
      See Also:
    • X_ORIGINAL_TOPIC

      public static final String X_ORIGINAL_TOPIC
      Kafka header for x-original-topic.
      See Also:
    • X_ORIGINAL_PARTITION

      public static final String X_ORIGINAL_PARTITION
      Kafka header for x-original-partition.
      See Also:
    • X_ORIGINAL_OFFSET

      public static final String X_ORIGINAL_OFFSET
      Kafka header for x-original-offset.
      See Also:
    • X_ORIGINAL_TIMESTAMP

      public static final String X_ORIGINAL_TIMESTAMP
      Kafka header for x-original-timestamp.
      See Also:
    • X_ORIGINAL_TIMESTAMP_TYPE

      public static final String X_ORIGINAL_TIMESTAMP_TYPE
      Kafka header for x-original-timestamp-type.
      See Also:
  • Constructor Details

    • KafkaMessageChannelBinder

      public KafkaMessageChannelBinder(org.springframework.cloud.stream.binder.kafka.properties.KafkaBinderConfigurationProperties configurationProperties, org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner provisioningProvider)
    • KafkaMessageChannelBinder

      public KafkaMessageChannelBinder(org.springframework.cloud.stream.binder.kafka.properties.KafkaBinderConfigurationProperties configurationProperties, org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner provisioningProvider, org.springframework.cloud.stream.config.ListenerContainerCustomizer<org.springframework.kafka.listener.AbstractMessageListenerContainer<?,?>> containerCustomizer, KafkaBindingRebalanceListener rebalanceListener)
    • KafkaMessageChannelBinder

      public KafkaMessageChannelBinder(org.springframework.cloud.stream.binder.kafka.properties.KafkaBinderConfigurationProperties configurationProperties, org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner provisioningProvider, org.springframework.cloud.stream.config.ListenerContainerCustomizer<org.springframework.kafka.listener.AbstractMessageListenerContainer<?,?>> containerCustomizer, org.springframework.cloud.stream.config.MessageSourceCustomizer<org.springframework.integration.kafka.inbound.KafkaMessageSource<?,?>> sourceCustomizer, KafkaBindingRebalanceListener rebalanceListener, org.springframework.cloud.stream.binder.kafka.utils.DlqPartitionFunction dlqPartitionFunction, org.springframework.cloud.stream.binder.kafka.utils.DlqDestinationResolver dlqDestinationResolver)
  • Method Details

    • onInit

      protected void onInit() throws Exception
      Overrides:
      onInit in class org.springframework.cloud.stream.binder.AbstractMessageChannelBinder<org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties>,org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties>,org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner>
      Throws:
      Exception
    • setExtendedBindingProperties

      public void setExtendedBindingProperties(org.springframework.cloud.stream.binder.kafka.properties.KafkaExtendedBindingProperties extendedBindingProperties)
    • setProducerListener

      public void setProducerListener(org.springframework.kafka.support.ProducerListener<byte[],byte[]> producerListener)
    • addClientFactoryCustomizer

      public void addClientFactoryCustomizer(ClientFactoryCustomizer customizer)
    • setRebalanceListener

      public void setRebalanceListener(KafkaBindingRebalanceListener rebalanceListener)
    • setDlqPartitionFunction

      public void setDlqPartitionFunction(org.springframework.cloud.stream.binder.kafka.utils.DlqPartitionFunction dlqPartitionFunction)
    • setDlqDestinationResolver

      public void setDlqDestinationResolver(org.springframework.cloud.stream.binder.kafka.utils.DlqDestinationResolver dlqDestinationResolver)
    • getExtendedConsumerProperties

      public org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties getExtendedConsumerProperties(String channelName)
      Specified by:
      getExtendedConsumerProperties in interface org.springframework.cloud.stream.binder.ExtendedBindingProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties,org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties>
    • getExtendedProducerProperties

      public org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties getExtendedProducerProperties(String channelName)
      Specified by:
      getExtendedProducerProperties in interface org.springframework.cloud.stream.binder.ExtendedBindingProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties,org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties>
    • getDefaultsPrefix

      public String getDefaultsPrefix()
      Specified by:
      getDefaultsPrefix in interface org.springframework.cloud.stream.binder.ExtendedBindingProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties,org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties>
    • getExtendedPropertiesEntryClass

      public Class<? extends org.springframework.cloud.stream.binder.BinderSpecificPropertiesProvider> getExtendedPropertiesEntryClass()
      Specified by:
      getExtendedPropertiesEntryClass in interface org.springframework.cloud.stream.binder.ExtendedBindingProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties,org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties>
    • getTransactionalProducerFactory

      @Nullable public org.springframework.kafka.core.ProducerFactory<byte[],byte[]> getTransactionalProducerFactory()
      Return a reference to the binder's transaction manager's producer factory (if configured). Use this to create a transaction manager in a bean definition when you wish to use producer-only transactions.
      Returns:
      the transaction manager, or null.
    • getBinderIdentity

      public String getBinderIdentity()
      Specified by:
      getBinderIdentity in interface org.springframework.cloud.stream.binder.Binder<org.springframework.messaging.MessageChannel,org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties>,org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties>>
    • createProducerMessageHandler

      protected org.springframework.messaging.MessageHandler createProducerMessageHandler(org.springframework.cloud.stream.provisioning.ProducerDestination destination, org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties> producerProperties, org.springframework.messaging.MessageChannel errorChannel) throws Exception
      Specified by:
      createProducerMessageHandler in class org.springframework.cloud.stream.binder.AbstractMessageChannelBinder<org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties>,org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties>,org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner>
      Throws:
      Exception
    • createProducerMessageHandler

      protected org.springframework.messaging.MessageHandler createProducerMessageHandler(org.springframework.cloud.stream.provisioning.ProducerDestination destination, org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties> producerProperties, org.springframework.messaging.MessageChannel channel, org.springframework.messaging.MessageChannel errorChannel) throws Exception
      Overrides:
      createProducerMessageHandler in class org.springframework.cloud.stream.binder.AbstractMessageChannelBinder<org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties>,org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties>,org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner>
      Throws:
      Exception
    • customizeProducerMessageHandler

      protected void customizeProducerMessageHandler(org.springframework.messaging.MessageHandler producerMessageHandler, String destinationName)
      Overrides:
      customizeProducerMessageHandler in class org.springframework.cloud.stream.binder.AbstractMessageChannelBinder<org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties>,org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties>,org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner>
    • postProcessOutputChannel

      protected void postProcessOutputChannel(org.springframework.messaging.MessageChannel outputChannel, org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties> producerProperties)
      Overrides:
      postProcessOutputChannel in class org.springframework.cloud.stream.binder.AbstractMessageChannelBinder<org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties>,org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties>,org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner>
    • getProducerFactory

      protected org.springframework.kafka.core.DefaultKafkaProducerFactory<byte[],byte[]> getProducerFactory(String transactionIdPrefix, org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties> producerProperties, String beanName, String destination)
    • useNativeEncoding

      protected boolean useNativeEncoding(org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties> producerProperties)
      Overrides:
      useNativeEncoding in class org.springframework.cloud.stream.binder.AbstractMessageChannelBinder<org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties>,org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties>,org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner>
    • createConsumerEndpoint

      protected org.springframework.integration.core.MessageProducer createConsumerEndpoint(org.springframework.cloud.stream.provisioning.ConsumerDestination destination, String group, org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties> extendedConsumerProperties)
      Specified by:
      createConsumerEndpoint in class org.springframework.cloud.stream.binder.AbstractMessageChannelBinder<org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties>,org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties>,org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner>
    • doGetAdditionalConfigurationProperties

      protected Map<String,Object> doGetAdditionalConfigurationProperties(String destinationName)
      Returns an unmodifiable copy of ContainerProperties associated with the destination name which corresponds to a particular binding which could be accessed under 'containerProperties' key.
      Overrides:
      doGetAdditionalConfigurationProperties in class org.springframework.cloud.stream.binder.AbstractMessageChannelBinder<org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties>,org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties>,org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner>
      Parameters:
      destinationName - the name of the destination (or binding name if destination is not specified)
      Returns:
      map of
    • setupRebalanceListener

      public void setupRebalanceListener(org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties> extendedConsumerProperties, org.springframework.kafka.listener.ContainerProperties containerProperties)
    • createPolledConsumerResources

      protected org.springframework.cloud.stream.binder.AbstractMessageChannelBinder.PolledConsumerResources createPolledConsumerResources(String name, String group, org.springframework.cloud.stream.provisioning.ConsumerDestination destination, org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties> extendedConsumerProperties)
      Overrides:
      createPolledConsumerResources in class org.springframework.cloud.stream.binder.AbstractMessageChannelBinder<org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties>,org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties>,org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner>
    • postProcessPollableSource

      protected void postProcessPollableSource(org.springframework.cloud.stream.binder.DefaultPollableMessageSource bindingTarget)
      Overrides:
      postProcessPollableSource in class org.springframework.cloud.stream.binder.AbstractMessageChannelBinder<org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties>,org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties>,org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner>
    • getErrorMessageStrategy

      protected org.springframework.integration.support.ErrorMessageStrategy getErrorMessageStrategy()
      Overrides:
      getErrorMessageStrategy in class org.springframework.cloud.stream.binder.AbstractMessageChannelBinder<org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties>,org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties>,org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner>
    • getErrorMessageHandler

      protected org.springframework.messaging.MessageHandler getErrorMessageHandler(org.springframework.cloud.stream.provisioning.ConsumerDestination destination, String group, org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties> properties)
      Overrides:
      getErrorMessageHandler in class org.springframework.cloud.stream.binder.AbstractMessageChannelBinder<org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties>,org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties>,org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner>
    • getPolledConsumerErrorMessageHandler

      protected org.springframework.messaging.MessageHandler getPolledConsumerErrorMessageHandler(org.springframework.cloud.stream.provisioning.ConsumerDestination destination, String group, org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties> properties)
      Overrides:
      getPolledConsumerErrorMessageHandler in class org.springframework.cloud.stream.binder.AbstractMessageChannelBinder<org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties>,org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties>,org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner>
    • createKafkaConsumerFactory

      protected org.springframework.kafka.core.ConsumerFactory<?,?> createKafkaConsumerFactory(boolean anonymous, String consumerGroup, org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties> consumerProperties, String beanName, String destination)
    • addConsumerConfigCustomizer

      public void addConsumerConfigCustomizer(org.springframework.cloud.stream.binder.kafka.support.ConsumerConfigCustomizer consumerConfigCustomizer)
    • addProducerConfigCustomizer

      public void addProducerConfigCustomizer(org.springframework.cloud.stream.binder.kafka.support.ProducerConfigCustomizer producerConfigCustomizer)