public static void ProcessPendingTransactions(bool debugging = false)
        {
            if (debugging)
            {
                Debug("ProcessPendingTransactions");
            }
            var lastId = GetLastProcessedId();

            if (debugging)
            {
                Debug($"GetLastProcessedId = {lastId}");
            }
            var table = CacheInvalidationGlobal.GetNewTransactions(lastId);

            if (debugging)
            {
                Debug($"table.Count = {table.Count}");
            }
            foreach (var row in table)
            {
                ProcessTransaction(row, debugging);
                lastId = row.Id;
            }
            LastProcessedIdLocal.UpdateId(lastId);
        }
        private static int GetLastProcessedId()
        {
            var id = LastProcessedIdLocal.GetId();

            if (id == null) // first time, initialize with -1
            {
                LastProcessedIdLocal.Insert(id: -1);
                id = -1;
            }
            return(id.Value);
        }