@Override public boolean removeUnnecessaryMessageQueue(MessageQueue mq, ProcessQueue pq) { this.defaultMQPullConsumerImpl.getOffsetStore().persist(mq); this.defaultMQPullConsumerImpl.getOffsetStore().removeOffset(mq); return true; }
@Override public void removeDirtyOffset(final MessageQueue mq) { this.defaultMQPullConsumerImpl.getOffsetStore().removeOffset(mq); }
public Map<MessageQueue, Long> getConsumerStatus(String topic, String group) { MQConsumerInner impl = this.consumerTable.get(group); if (impl != null && impl instanceof DefaultMQPushConsumerImpl) { DefaultMQPushConsumerImpl consumer = (DefaultMQPushConsumerImpl) impl; return consumer.getOffsetStore().cloneOffsetTable(topic); } else if (impl != null && impl instanceof DefaultMQPullConsumerImpl) { DefaultMQPullConsumerImpl consumer = (DefaultMQPullConsumerImpl) impl; return consumer.getOffsetStore().cloneOffsetTable(topic); } else { return Collections.EMPTY_MAP; } }
} finally { if (mqs != null) { consumer.getDefaultMQPullConsumerImpl().getOffsetStore().persistAll(mqs);
@Override public boolean removeUnnecessaryMessageQueue(MessageQueue mq, ProcessQueue pq) { this.defaultMQPullConsumerImpl.getOffsetStore().persist(mq); this.defaultMQPullConsumerImpl.getOffsetStore().removeOffset(mq); return true; }
@Override public void removeDirtyOffset(final MessageQueue mq) { this.defaultMQPullConsumerImpl.getOffsetStore().removeOffset(mq); }
public Map<MessageQueue, Long> getConsumerStatus(String topic, String group) { MQConsumerInner impl = this.consumerTable.get(group); if (impl != null && impl instanceof DefaultMQPushConsumerImpl) { DefaultMQPushConsumerImpl consumer = (DefaultMQPushConsumerImpl) impl; return consumer.getOffsetStore().cloneOffsetTable(topic); } else if (impl != null && impl instanceof DefaultMQPullConsumerImpl) { DefaultMQPullConsumerImpl consumer = (DefaultMQPullConsumerImpl) impl; return consumer.getOffsetStore().cloneOffsetTable(topic); } else { return Collections.EMPTY_MAP; } }
} finally { if (mqs != null) { consumer.getDefaultMQPullConsumerImpl().getOffsetStore().persistAll(mqs);
@Override public boolean removeUnnecessaryMessageQueue(MessageQueue mq, ProcessQueue pq) { this.defaultMQPullConsumerImpl.getOffsetStore().persist(mq); this.defaultMQPullConsumerImpl.getOffsetStore().removeOffset(mq); return true; }
@Override public void removeDirtyOffset(final MessageQueue mq) { this.defaultMQPullConsumerImpl.getOffsetStore().removeOffset(mq); }
public Map<MessageQueue, Long> getConsumerStatus(String topic, String group) { MQConsumerInner impl = this.consumerTable.get(group); if (impl != null && impl instanceof DefaultMQPushConsumerImpl) { DefaultMQPushConsumerImpl consumer = (DefaultMQPushConsumerImpl) impl; return consumer.getOffsetStore().cloneOffsetTable(topic); } else if (impl != null && impl instanceof DefaultMQPullConsumerImpl) { DefaultMQPullConsumerImpl consumer = (DefaultMQPullConsumerImpl) impl; return consumer.getOffsetStore().cloneOffsetTable(topic); } else { return Collections.EMPTY_MAP; } }
} finally { if (mqs != null) { consumer.getDefaultMQPullConsumerImpl().getOffsetStore().persistAll(mqs);