public PullRequest(string consumerId, string groupName, MessageQueue messageQueue, long nextConsumeOffset) { ConsumerId = consumerId; GroupName = groupName; MessageQueue = messageQueue; NextConsumeOffset = nextConsumeOffset; ProcessQueue = new ProcessQueue(); }
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>(); }
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>(); }
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); }
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); }
public ConsumingMessage(QueueMessage message, ProcessQueue processQueue) { Message = message; ProcessQueue = processQueue; }
public WrappedMessage(MessageQueue messageQueue, QueueMessage queueMessage, ProcessQueue processQueue) { MessageQueue = messageQueue; QueueMessage = queueMessage; ProcessQueue = processQueue; }