private static int GetLastProcessedId()
        {
            var id = LastProcessedId.GetId();

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