public void SetUp()
        {
            documentStore = InMemoryStoreBuilder.GetInMemoryStore(withExpiration: true);

            var customIndex = new ExpiryProcessedMessageIndex();

            customIndex.Execute(documentStore);
        }
        public void Execute(DocumentDatabase database)
        {
            Database = database;
            indexName = new ExpiryProcessedMessageIndex().IndexName;

            deletionBatchSize = Settings.ExpirationProcessBatchSize;
            deleteFrequencyInSeconds = Settings.ExpirationProcessTimerInSeconds;

            if (deleteFrequencyInSeconds == 0)
            {
                return;
            }

            logger.Info("Expired Documents every {0} seconds", deleteFrequencyInSeconds);
            logger.Info("Deletion Batch Size: {0}", deletionBatchSize);
            logger.Info("Retention Period: {0}", Settings.HoursToKeepMessagesBeforeExpiring);

            timer = new PeriodicExecutor(Delete,TimeSpan.FromSeconds(deleteFrequencyInSeconds));
            timer.Start(true);
        }
        public void SetUp()
        {
            documentStore = InMemoryStoreBuilder.GetInMemoryStore(withExpiration: true);

            var customIndex = new ExpiryProcessedMessageIndex();
            customIndex.Execute(documentStore);
        }