Search in sources :

Example 6 with ProcessQueue

use of org.apache.rocketmq.client.impl.consumer.ProcessQueue in project rocketmq-rocketmq-all-4.1.0-incubating by lirenzuo.

the class DefaultMQPushConsumerTest method createPullRequest.

private PullRequest createPullRequest() {
    PullRequest pullRequest = new PullRequest();
    pullRequest.setConsumerGroup(consumerGroup);
    pullRequest.setNextOffset(1024);
    MessageQueue messageQueue = new MessageQueue();
    messageQueue.setBrokerName(brokerName);
    messageQueue.setQueueId(0);
    messageQueue.setTopic(topic);
    pullRequest.setMessageQueue(messageQueue);
    ProcessQueue processQueue = new ProcessQueue();
    processQueue.setLocked(true);
    processQueue.setLastLockTimestamp(System.currentTimeMillis());
    pullRequest.setProcessQueue(processQueue);
    return pullRequest;
}
Also used : MessageQueue(org.apache.rocketmq.common.message.MessageQueue) ProcessQueue(org.apache.rocketmq.client.impl.consumer.ProcessQueue) PullRequest(org.apache.rocketmq.client.impl.consumer.PullRequest)

Aggregations

ProcessQueue (org.apache.rocketmq.client.impl.consumer.ProcessQueue)6 MessageQueue (org.apache.rocketmq.common.message.MessageQueue)6 Map (java.util.Map)4 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)4 MQClientException (org.apache.rocketmq.client.exception.MQClientException)4 UnsupportedEncodingException (java.io.UnsupportedEncodingException)2 HashMap (java.util.HashMap)2 TreeMap (java.util.TreeMap)2 ConcurrentMap (java.util.concurrent.ConcurrentMap)2 AtomicLong (java.util.concurrent.atomic.AtomicLong)2 ReadWriteLock (java.util.concurrent.locks.ReadWriteLock)2 MQBrokerException (org.apache.rocketmq.client.exception.MQBrokerException)2 DefaultMQPushConsumerImpl (org.apache.rocketmq.client.impl.consumer.DefaultMQPushConsumerImpl)2 MQConsumerInner (org.apache.rocketmq.client.impl.consumer.MQConsumerInner)2 PullRequest (org.apache.rocketmq.client.impl.consumer.PullRequest)2 MessageExt (org.apache.rocketmq.common.message.MessageExt)2 RemotingException (org.apache.rocketmq.remoting.exception.RemotingException)2