Example #1
0
        void PublishWorkerAvailability()
        {
            try
            {
                var message = new WorkerAvailable <TMessage>(_controlUri, _dataUri, _inProgress, _inProgressLimit,
                                                             _pendingMessages.PendingMessageCount(), _pendingLimit);
                _updatePending = false;

                _bus.Publish(message);
            }
            catch
            {
            }
        }
Example #2
0
 void PublishWorkerAvailable <TMessage>()
 {
     _bus.Publish(new WorkerAvailable <TMessage>(_controlUri, _dataUri, _inProgress, _inProgressLimit,
                                                 _pendingMessages.PendingMessageCount(), _pendingLimit));
 }
Example #3
0
        public void Consume(IConsumeContext <PingWorker> context)
        {
            try
            {
                var message = new WorkerAvailable <TMessage>(_worker.ControlUri, _worker.DataUri,
                                                             _inProgress, _inProgressLimit, _pending.PendingMessageCount(), _pendingLimit);

                context.Respond(message);

                if (_log.IsDebugEnabled)
                {
                    _log.DebugFormat("Worker {0}: {1} in progress, {2} pending", _worker.DataUri,
                                     _inProgress, _pending);
                }
            }
            catch
            {
            }
        }
Example #4
0
        private void PublishWorkerAvailability()
        {
            _updatePending = false;

            _bus.Publish(new WorkerAvailable <T>(_controlUri, _dataUri, _inProgress, _inProgressLimit, _pendingMessages.PendingMessageCount(), _pendingLimit));
        }