コード例 #1
0
ファイル: PullRequest.cs プロジェクト: u8u5i/equeue
 public PullRequest(string consumerId, string groupName, MessageQueue messageQueue, long nextConsumeOffset)
 {
     ConsumerId        = consumerId;
     GroupName         = groupName;
     MessageQueue      = messageQueue;
     NextConsumeOffset = nextConsumeOffset;
     ProcessQueue      = new ProcessQueue();
 }
コード例 #2
0
ファイル: PullRequest.cs プロジェクト: edgevagrant/equeue
 public PullRequest(string consumerId, string groupName, MessageQueue messageQueue, long nextConsumeOffset)
 {
     ConsumerId = consumerId;
     GroupName = groupName;
     MessageQueue = messageQueue;
     NextConsumeOffset = nextConsumeOffset;
     ProcessQueue = new ProcessQueue();
 }
コード例 #3
0
ファイル: PullRequest.cs プロジェクト: a407121393/equeue
 public PullRequest(string consumerId, string groupName, MessageQueue messageQueue, long nextConsumeOffset, HashSet<string> tags)
 {
     ConsumerId = consumerId;
     GroupName = groupName;
     MessageQueue = messageQueue;
     NextConsumeOffset = nextConsumeOffset;
     ProcessQueue = new ProcessQueue();
     Tags = tags ?? new HashSet<string>();
 }
コード例 #4
0
 public PullRequest(string consumerId, string groupName, MessageQueue messageQueue, long nextConsumeOffset, HashSet <string> tags)
 {
     ConsumerId        = consumerId;
     GroupName         = groupName;
     MessageQueue      = messageQueue;
     NextConsumeOffset = nextConsumeOffset;
     ProcessQueue      = new ProcessQueue();
     Tags = tags ?? new HashSet <string>();
 }
コード例 #5
0
ファイル: PullRequest.cs プロジェクト: peidachang/equeue
        public PullRequest(
            string consumerId,
            string groupName,
            MessageQueue messageQueue,
            SocketRemotingClient remotingClient,
            MessageHandleMode messageHandleMode,
            IMessageHandler messageHandler,
            IOffsetStore offsetStore,
            PullRequestSetting setting)
        {
            ConsumerId = consumerId;
            GroupName = groupName;
            MessageQueue = messageQueue;
            ProcessQueue = new ProcessQueue();

            _queueOffset = -1;
            _remotingClient = remotingClient;
            _setting = setting;
            _messageHandleMode = messageHandleMode;
            _messageHandler = messageHandler;
            _offsetStore = offsetStore;
            _messageQueue = new BlockingCollection<WrappedMessage>(new ConcurrentQueue<WrappedMessage>());
            _handlingMessageDict = new ConcurrentDictionary<long, WrappedMessage>();
            _pullMessageWorker = new Worker(() =>
            {
                try
                {
                    PullMessage();
                }
                catch (Exception ex)
                {
                    if (!_stoped)
                    {
                        _logger.Error(string.Format("[{0}]: PullMessage has unknown exception. PullRequest: {1}.", ConsumerId, this), ex);
                    }
                }
            });
            _handleMessageWorker = new Worker(HandleMessage);
            _binarySerializer = ObjectContainer.Resolve<IBinarySerializer>();
            _logger = ObjectContainer.Resolve<ILoggerFactory>().Create(GetType().Name);
        }
コード例 #6
0
        public PullRequest(
            string consumerId,
            string groupName,
            MessageQueue messageQueue,
            long queueOffset,
            SocketRemotingClient remotingClient,
            MessageHandleMode messageHandleMode,
            IMessageHandler messageHandler,
            PullRequestSetting setting)
        {
            ConsumerId   = consumerId;
            GroupName    = groupName;
            MessageQueue = messageQueue;
            ProcessQueue = new ProcessQueue();

            _queueOffset         = queueOffset;
            _remotingClient      = remotingClient;
            _setting             = setting;
            _messageHandleMode   = messageHandleMode;
            _messageHandler      = messageHandler;
            _messageQueue        = new BlockingCollection <WrappedMessage>(new ConcurrentQueue <WrappedMessage>());
            _handlingMessageDict = new ConcurrentDictionary <long, WrappedMessage>();
            _pullMessageWorker   = new Worker(() =>
            {
                try
                {
                    PullMessage();
                }
                catch (Exception ex)
                {
                    if (!_stoped)
                    {
                        _logger.Error(string.Format("PullMessage has unknown exception, pullRequest:{0}.", this), ex);
                    }
                }
            });
            _handleMessageWorker = new Worker(HandleMessage);
            _binarySerializer    = ObjectContainer.Resolve <IBinarySerializer>();
            _logger = ObjectContainer.Resolve <ILoggerFactory>().Create(GetType().FullName);
        }
コード例 #7
0
 public ConsumingMessage(QueueMessage message, ProcessQueue processQueue)
 {
     Message      = message;
     ProcessQueue = processQueue;
 }
コード例 #8
0
 public WrappedMessage(MessageQueue messageQueue, QueueMessage queueMessage, ProcessQueue processQueue)
 {
     MessageQueue = messageQueue;
     QueueMessage = queueMessage;
     ProcessQueue = processQueue;
 }
コード例 #9
0
ファイル: WrappedMessage.cs プロジェクト: kouweizhong/equeue
 public WrappedMessage(MessageQueue messageQueue, QueueMessage queueMessage, ProcessQueue processQueue)
 {
     MessageQueue = messageQueue;
     QueueMessage = queueMessage;
     ProcessQueue = processQueue;
 }
コード例 #10
0
 public ConsumingMessage(QueueMessage message, ProcessQueue processQueue)
 {
     Message = message;
     ProcessQueue = processQueue;
 }