//package org.egl_cepgl.pm.config;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.CommandLineRunner;
//import org.springframework.data.mongodb.core.CollectionOptions;
//import org.springframework.data.mongodb.core.ReactiveMongoOperations;
//import org.springframework.data.mongodb.core.ReactiveMongoTemplate;
//import org.springframework.stereotype.Component;
//import reactor.core.publisher.Mono;
//
//@Component
//public class MongoCollectionInitializer implements CommandLineRunner {
//
//    private final ReactiveMongoTemplate reactiveMongoTemplate;
//
//    @Autowired
//    public MongoCollectionInitializer(ReactiveMongoTemplate reactiveMongoTemplate) {
//        this.reactiveMongoTemplate = reactiveMongoTemplate;
//    }
//
//    @Override
//    public void run(String... args) throws Exception {
//        reactiveMongoTemplate.executeCommand("{ convertToCapped: 'chatMessage', size: 10485760 }")
//                .subscribe(); // size in bytes
//    }
//}
