Esempio n. 1
0
 /// <summary>
 /// Checks whether or not the service bus topic is up and running
 /// </summary>
 protected override void CheckComponentResponsiveness()
 {
     if (_topicDescriptionRetriever
         .Get(TopicPath)
         .AvailabilityStatus != EntityAvailabilityStatus.Available)
     {
         throw new ApplicationException("ServiceBus is not available");
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Counts the number of messages pending to be processed in the topic
 /// </summary>
 /// <returns>The total number of messages pending to be processed in the topic</returns>
 public override long Monitor()
 {
     try
     {
         return _topicDescriptionRetriever
             .Get(TopicPath)
             .SizeInBytes;
     }
     catch
     {
         return -1;
     }
 }