Examples of updateConsumeOffset()


Examples of com.alibaba.rocketmq.client.consumer.DefaultMQPullConsumer.updateConsumeOffset()

            if (mqs != null && !mqs.isEmpty()) {
                TreeSet<MessageQueue> mqsNew = new TreeSet<MessageQueue>(mqs);
                for (MessageQueue mq : mqsNew) {
                    long offset = consumer.searchOffset(mq, timestamp);
                    if (offset >= 0) {
                        consumer.updateConsumeOffset(mq, offset);
                        log.info("resetOffsetByTimestamp updateConsumeOffset success, {} {} {}",
                            consumerGroup, offset, mq);
                    }
                }
            }
View Full Code Here

Examples of com.alibaba.rocketmq.client.consumer.DefaultMQPullConsumer.updateConsumeOffset()

                        break;
                    default:
                        break;
                    }

                    consumer.updateConsumeOffset(mq, pullResult.getNextBeginOffset());
                }
                catch (Exception e) {
                    e.printStackTrace();
                }
            }
View Full Code Here

Examples of com.alibaba.rocketmq.client.consumer.DefaultMQPullConsumer.updateConsumeOffset()

            if (mqs != null && !mqs.isEmpty()) {
                TreeSet<MessageQueue> mqsNew = new TreeSet<MessageQueue>(mqs);
                for (MessageQueue mq : mqsNew) {
                    long offset = consumer.searchOffset(mq, timestamp);
                    if (offset >= 0) {
                        consumer.updateConsumeOffset(mq, offset);
                        log.info("resetOffsetByTimestamp updateConsumeOffset success, {} {} {}",
                            consumerGroup, offset, mq);
                    }
                }
            }
View Full Code Here

Examples of com.alibaba.rocketmq.client.consumer.MQPullConsumer.updateConsumeOffset()

                    default:
                        break;
                    }

                    // 存储Offset,客户端每隔5s会定时刷新到Broker
                    consumer.updateConsumeOffset(mq, pullResult.getNextBeginOffset());

                    // 设置再过100ms后重新拉取
                    context.setPullNextDelayTimeMillis(100);
                }
                catch (Exception e) {
View Full Code Here

Examples of com.alibaba.rocketmq.client.impl.consumer.DefaultMQPushConsumerImpl.updateConsumeOffset()

            // 更新消费队列的 offset 并提交到 broker
            Iterator<MessageQueue> iterator = offsetTable.keySet().iterator();
            while (iterator.hasNext()) {
                MessageQueue mq = iterator.next();
                consumer.updateConsumeOffset(mq, offsetTable.get(mq));
                log.info("[reset-offset] reset offsetTable. topic={}, group={}, mq={}, offset={}",
                    new Object[] { topic, group, mq, offsetTable.get(mq) });
            }
            consumer.getOffsetStore().persistAll(offsetTable.keySet());
View Full Code Here

Examples of com.alibaba.rocketmq.client.impl.consumer.DefaultMQPushConsumerImpl.updateConsumeOffset()

            // 更新消费队列的 offset 并提交到 broker
            iterator = offsetTable.keySet().iterator();
            while (iterator.hasNext()) {
                MessageQueue mq = iterator.next();
                consumer.updateConsumeOffset(mq, offsetTable.get(mq));
                log.info("[reset-offset] reset offsetTable. topic={}, group={}, mq={}, offset={}",
                    new Object[] { topic, group, mq, offsetTable.get(mq) });
            }
            consumer.getOffsetStore().persistAll(offsetTable.keySet());
View Full Code Here

Examples of com.alibaba.rocketmq.client.impl.consumer.DefaultMQPushConsumerImpl.updateConsumeOffset()

            // 更新消费队列的 offset 并提交到 broker
            Iterator<MessageQueue> iterator = offsetTable.keySet().iterator();
            while (iterator.hasNext()) {
                MessageQueue mq = iterator.next();
                consumer.updateConsumeOffset(mq, offsetTable.get(mq));
                log.info("[reset-offset] reset offsetTable. topic={}, group={}, mq={}, offset={}",
                    new Object[] { topic, group, mq, offsetTable.get(mq) });
            }
            consumer.getOffsetStore().persistAll(offsetTable.keySet());
View Full Code Here

Examples of com.alibaba.rocketmq.client.impl.consumer.DefaultMQPushConsumerImpl.updateConsumeOffset()

            // 更新消费队列的 offset 并提交到 broker
            iterator = offsetTable.keySet().iterator();
            while (iterator.hasNext()) {
                MessageQueue mq = iterator.next();
                consumer.updateConsumeOffset(mq, offsetTable.get(mq));
                log.info("[reset-offset] reset offsetTable. topic={}, group={}, mq={}, offset={}",
                    new Object[] { topic, group, mq, offsetTable.get(mq) });
            }
            consumer.getOffsetStore().persistAll(offsetTable.keySet());
View Full Code Here

Examples of com.alibaba.rocketmq.client.impl.consumer.DefaultMQPushConsumerImpl.updateConsumeOffset()

            // 更新消费队列的 offset 并提交到 broker
            Iterator<MessageQueue> iterator = offsetTable.keySet().iterator();
            while (iterator.hasNext()) {
                MessageQueue mq = iterator.next();
                consumer.updateConsumeOffset(mq, offsetTable.get(mq));
                log.info("[reset-offset] reset offsetTable. topic={}, group={}, mq={}, offset={}",
                    new Object[] { topic, group, mq, offsetTable.get(mq) });
            }
            consumer.getOffsetStore().persistAll(offsetTable.keySet());
View Full Code Here

Examples of com.alibaba.rocketmq.client.impl.consumer.DefaultMQPushConsumerImpl.updateConsumeOffset()

            // 更新消费队列的 offset 并提交到 broker
            iterator = offsetTable.keySet().iterator();
            while (iterator.hasNext()) {
                MessageQueue mq = iterator.next();
                consumer.updateConsumeOffset(mq, offsetTable.get(mq));
                log.info("[reset-offset] reset offsetTable. topic={}, group={}, mq={}, offset={}",
                    new Object[] { topic, group, mq, offsetTable.get(mq) });
            }
            consumer.getOffsetStore().persistAll(offsetTable.keySet());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.