Example usage for org.springframework.integration.store MessageGroupStoreReaper setExpireOnDestroy

List of usage examples for org.springframework.integration.store MessageGroupStoreReaper setExpireOnDestroy

Introduction

In this page you can find the example usage for org.springframework.integration.store MessageGroupStoreReaper setExpireOnDestroy.

Prototype

public void setExpireOnDestroy(boolean expireOnDestroy) 

Source Link

Document

Flag to indicate that the stores should be expired when this component is destroyed (i.e.

Usage

From source file:org.springframework.cloud.stream.app.hdfs.dataset.sink.HdfsDatasetSinkConfiguration.java

@Bean
MessageGroupStoreReaper messageGroupStoreReaper(MessageGroupStore messageStore,
        InputBindingLifecycle inputBindingLifecycle) {
    MessageGroupStoreReaper messageGroupStoreReaper = new MessageGroupStoreReaper(messageStore);
    messageGroupStoreReaper.setPhase(inputBindingLifecycle.getPhase() - 1);
    messageGroupStoreReaper.setTimeout(properties.getIdleTimeout());
    messageGroupStoreReaper.setAutoStartup(true);
    messageGroupStoreReaper.setExpireOnDestroy(true);
    return messageGroupStoreReaper;
}