Search in sources :

Example 1 with PullRequest

use of org.apache.rocketmq.client.impl.consumer.PullRequest in project rocketmq by apache.

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)

Example 2 with PullRequest

use of org.apache.rocketmq.client.impl.consumer.PullRequest 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)2 PullRequest (org.apache.rocketmq.client.impl.consumer.PullRequest)2 MessageQueue (org.apache.rocketmq.common.message.MessageQueue)2