All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pl.allegro.tech.hermes.consumers.config.MessageConfiguration Maven / Gradle / Ivy

There is a newer version: 2.8.0
Show newest version
package pl.allegro.tech.hermes.consumers.config;

import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import pl.allegro.tech.hermes.common.message.undelivered.UndeliveredMessageLog;
import pl.allegro.tech.hermes.consumers.message.undelivered.UndeliveredMessageLogPersister;

@Configuration
@EnableConfigurationProperties(CommonConsumerProperties.class)
public class MessageConfiguration {

    @Bean
    public UndeliveredMessageLogPersister undeliveredMessageLogPersister(UndeliveredMessageLog undeliveredMessageLog,
                                                                         CommonConsumerProperties commonConsumerProperties) {
        return new UndeliveredMessageLogPersister(undeliveredMessageLog, commonConsumerProperties.getUndeliveredMessageLogPersistPeriod());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy