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
-
Method Summary
Modifier and TypeMethodDescriptionorg.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
destroy()
org.springframework.amqp.support.converter.Jackson2JsonMessageConverter
rabbitConsumer
(MessageHandler messageHandler) org.springframework.amqp.rabbit.core.RabbitTemplate
rabbitTemplate
(org.springframework.amqp.rabbit.connection.ConnectionFactory rabbitConnectionFactory)
-
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 interfaceDisposableBean
-