接口 com.alibaba.rocketmq.client.consumer.store.OffsetStore
的使用

使用 OffsetStore 的软件包
com.alibaba.rocketmq.client.consumer   
com.alibaba.rocketmq.client.consumer.store   
com.alibaba.rocketmq.client.impl.consumer   
 

com.alibaba.rocketmq.client.consumerOffsetStore 的使用
 

返回 OffsetStorecom.alibaba.rocketmq.client.consumer 中的方法
 OffsetStore DefaultMQPushConsumer.getOffsetStore()
           
 OffsetStore DefaultMQPullConsumer.getOffsetStore()
           
 

参数类型为 OffsetStorecom.alibaba.rocketmq.client.consumer 中的方法
 void DefaultMQPushConsumer.setOffsetStore(OffsetStore offsetStore)
           
 void DefaultMQPullConsumer.setOffsetStore(OffsetStore offsetStore)
           
 

com.alibaba.rocketmq.client.consumer.storeOffsetStore 的使用
 

实现 OffsetStorecom.alibaba.rocketmq.client.consumer.store 中的类
 class LocalFileOffsetStore
          消费进度存储到Consumer本地
 class RemoteBrokerOffsetStore
          消费进度存储到远端Broker,比较可靠
 

com.alibaba.rocketmq.client.impl.consumerOffsetStore 的使用
 

返回 OffsetStorecom.alibaba.rocketmq.client.impl.consumer 中的方法
 OffsetStore DefaultMQPushConsumerImpl.getOffsetStore()
           
 OffsetStore DefaultMQPullConsumerImpl.getOffsetStore()
           
 

参数类型为 OffsetStorecom.alibaba.rocketmq.client.impl.consumer 中的方法
 void DefaultMQPushConsumerImpl.setOffsetStore(OffsetStore offsetStore)
           
 void DefaultMQPullConsumerImpl.setOffsetStore(OffsetStore offsetStore)
           
 



Copyright © 2012-2014. All Rights Reserved.