Search in sources :

Example 1 with ResetOffsetRequest

use of org.apache.rocketmq.console.model.request.ResetOffsetRequest in project rocketmq-externals by apache.

the class ConsumerServiceImplTest method resetOffset.

@Test
public void resetOffset() throws Exception {
    ResetOffsetRequest resetOffsetRequest = new ResetOffsetRequest();
    resetOffsetRequest.setConsumerGroupList(Lists.<String>newArrayList(TEST_CONSUMER_GROUP));
    resetOffsetRequest.setForce(true);
    resetOffsetRequest.setTopic(TEST_CONSOLE_TOPIC);
    resetOffsetRequest.setResetTime(System.currentTimeMillis() - 1000);
    Map<String, ConsumerGroupRollBackStat> /*consumerGroup*/
    consumerGroupRollBackStatMap = consumerService.resetOffset(resetOffsetRequest);
    Assert.assertNotNull(consumerGroupRollBackStatMap);
    Assert.assertNotNull(consumerGroupRollBackStatMap.get(TEST_CONSUMER_GROUP));
}
Also used : ResetOffsetRequest(org.apache.rocketmq.console.model.request.ResetOffsetRequest) ConsumerGroupRollBackStat(org.apache.rocketmq.console.model.ConsumerGroupRollBackStat) Test(org.junit.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest)

Aggregations

ConsumerGroupRollBackStat (org.apache.rocketmq.console.model.ConsumerGroupRollBackStat)1 ResetOffsetRequest (org.apache.rocketmq.console.model.request.ResetOffsetRequest)1 Test (org.junit.Test)1 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)1