Exemplo n.º 1
0
        public DateTime?GetTimeStampOfMostRecentDeadletter(string parentTopicName, string subscriptionName)
        {
            var endpoint       = new SubscriptionDeadletterEndpoint(CreateNamespaceManager(), CreateEndpointFactory(), parentTopicName, subscriptionName);
            var deadletterList = MessageServices.GetMessagesFromEndpoint(endpoint);
            var mostRecent     = deadletterList.OrderByDescending(x => x.EnqueuedTimeUtc).FirstOrDefault();

            return(mostRecent?.EnqueuedTimeUtc);
        }
Exemplo n.º 2
0
        protected IEnumerable <VengaMessage> GetMessagesFromEndpoint(Endpoint endpoint, int messageCount)
        {
            var brokeredMessagesList = MessageServices.GetMessagesFromEndpoint(endpoint, messageCount);
            var messagesToReturn     = new List <VengaMessage>();

            foreach (var message in brokeredMessagesList)
            {
                messagesToReturn.Add(VengaMessage.FromBrokeredMessage(message));
            }
            return(messagesToReturn);
        }