Class RabbitConsumerConfiguration

java.lang.Object
org.springframework.cloud.fn.consumer.rabbit.RabbitConsumerConfiguration
All Implemented Interfaces:
DisposableBean

@EnableConfigurationProperties(RabbitConsumerProperties.class) @Configuration public class RabbitConsumerConfiguration extends Object implements DisposableBean
A configuration for RabbitMQ Consumer function. Uses a AmqpOutboundChannelAdapterSpec to save payload contents to RabbitMQ.
Author:
Soby Chako, Nicolas Labrot, Chris Bono
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.integration.amqp.dsl.AmqpOutboundChannelAdapterSpec
    amqpChannelAdapter(org.springframework.amqp.rabbit.connection.ConnectionFactory rabbitConnectionFactory, org.springframework.cloud.fn.common.config.ComponentCustomizer<org.springframework.integration.amqp.dsl.AmqpOutboundChannelAdapterSpec> amqpOutboundChannelAdapterSpecCustomizer)
     
    void
     
    org.springframework.amqp.support.converter.Jackson2JsonMessageConverter
     
     
    org.springframework.amqp.rabbit.core.RabbitTemplate
    rabbitTemplate(org.springframework.amqp.rabbit.connection.ConnectionFactory rabbitConnectionFactory)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RabbitConsumerConfiguration

      public RabbitConsumerConfiguration()
  • Method Details

    • rabbitConsumer

      @Bean public Function<Message<?>,Object> rabbitConsumer(@Qualifier("amqpChannelAdapter") MessageHandler messageHandler)
    • amqpChannelAdapter

      @Bean public org.springframework.integration.amqp.dsl.AmqpOutboundChannelAdapterSpec amqpChannelAdapter(org.springframework.amqp.rabbit.connection.ConnectionFactory rabbitConnectionFactory, @Nullable org.springframework.cloud.fn.common.config.ComponentCustomizer<org.springframework.integration.amqp.dsl.AmqpOutboundChannelAdapterSpec> amqpOutboundChannelAdapterSpecCustomizer) throws Exception
      Throws:
      Exception
    • rabbitTemplate

      @Bean public org.springframework.amqp.rabbit.core.RabbitTemplate rabbitTemplate(org.springframework.amqp.rabbit.connection.ConnectionFactory rabbitConnectionFactory)
    • jsonConverter

      @Bean @ConditionalOnProperty(name="rabbit.converterBeanName", havingValue="jsonConverter") public org.springframework.amqp.support.converter.Jackson2JsonMessageConverter jsonConverter()
    • destroy

      public void destroy()
      Specified by:
      destroy in interface DisposableBean