Class MongoDbConsumerConfiguration

java.lang.Object
org.springframework.cloud.fn.consumer.mongo.MongoDbConsumerConfiguration

@Configuration(proxyBeanMethods=false) @EnableConfigurationProperties(MongoDbConsumerProperties.class) public class MongoDbConsumerConfiguration extends Object
A configuration for MongoDB Consumer function. Uses a ReactiveMongoDbStoringMessageHandler to save payload contents to Mongo DB.
Author:
Artem Bilan, David Turanski
  • Constructor Details

    • MongoDbConsumerConfiguration

      public MongoDbConsumerConfiguration(MongoDbConsumerProperties properties, org.springframework.data.mongodb.core.ReactiveMongoTemplate mongoTemplate)
  • Method Details

    • mongodbConsumer

      @Bean public Consumer<Message<?>> mongodbConsumer(Function<Message<?>,reactor.core.publisher.Mono<Void>> mongodbConsumerFunction)
    • mongodbConsumerFunction

      @Bean public Function<Message<?>,reactor.core.publisher.Mono<Void>> mongodbConsumerFunction(ReactiveMessageHandler mongoConsumerMessageHandler)
    • mongoConsumerMessageHandler

      @Bean public ReactiveMessageHandler mongoConsumerMessageHandler(@Nullable org.springframework.cloud.fn.common.config.ComponentCustomizer<org.springframework.integration.mongodb.outbound.ReactiveMongoDbStoringMessageHandler> mongoDbMessageHandlerCustomizer)