예제 #1
0
 public void Handle(SubscriptionMessage.PersistentSubscriptionTimerTick message)
 {
     if (!_handleTick)
     {
         return;
     }
     try {
         WakeSubscriptions();
     } finally {
         _bus.Publish(_tickRequestMessage);
     }
 }
 public void Handle(SubscriptionMessage.PersistentSubscriptionTimerTick message)
 {
     if (!_handleTick || _timerTickCorrelationId != message.CorrelationId)
     {
         return;
     }
     try {
         WakeSubscriptions();
     } finally {
         _timerTickCorrelationId = Guid.NewGuid();
         _bus.Publish(TimerMessage.Schedule.Create(TimeSpan.FromMilliseconds(1000),
                                                   new PublishEnvelope(_bus),
                                                   new SubscriptionMessage.PersistentSubscriptionTimerTick(_timerTickCorrelationId)));
     }
 }