public DefaultMQPullConsumer(final String consumerGroup, RPCHook rpcHook) { this.consumerGroup = consumerGroup; defaultMQPullConsumerImpl = new DefaultMQPullConsumerImpl(this, rpcHook); }
@Override public void createTopic(String key, String newTopic, int queueNum, int topicSysFlag) throws MQClientException { this.defaultMQPullConsumerImpl.createTopic(key, newTopic, queueNum, topicSysFlag); }
@Override public long earliestMsgStoreTime(MessageQueue mq) throws MQClientException { return this.defaultMQPullConsumerImpl.earliestMsgStoreTime(mq); }
private PullResult pullSyncImpl(MessageQueue mq, SubscriptionData subscriptionData, long offset, int maxNums, boolean block, long timeout) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { this.makeSureStateOK(); this.subscriptionAutomatically(mq.getTopic()); ConsumeMessageContext consumeMessageContext = null; consumeMessageContext = new ConsumeMessageContext(); consumeMessageContext.setConsumerGroup(this.groupName()); consumeMessageContext.setMq(mq); consumeMessageContext.setMsgList(pullResult.getMsgFoundList()); consumeMessageContext.setSuccess(false); this.executeHookBefore(consumeMessageContext); consumeMessageContext.setStatus(ConsumeConcurrentlyStatus.CONSUME_SUCCESS.toString()); consumeMessageContext.setSuccess(true); this.executeHookAfter(consumeMessageContext);
this.serviceState = ServiceState.START_FAILED; this.checkConfig(); this.copySubscription(); this.defaultMQPullConsumer.getConsumerGroup(), isUnitMode()); this.pullAPIWrapper.registerFilterMessageHook(filterMessageHookList);
@Override public Set<MessageQueue> fetchMessageQueuesInBalance(String topic) throws MQClientException { return this.defaultMQPullConsumerImpl.fetchMessageQueuesInBalance(topic); }
@Override public long fetchConsumeOffset(MessageQueue mq, boolean fromStore) throws MQClientException { return this.defaultMQPullConsumerImpl.fetchConsumeOffset(mq, fromStore); }
@Override public Set<MessageQueue> fetchSubscribeMessageQueues(String topic) throws MQClientException { return this.defaultMQPullConsumerImpl.fetchSubscribeMessageQueues(topic); }
private PullResult pullSyncImpl(MessageQueue mq, String subExpression, long offset, int maxNums, boolean block, long timeout, boolean isSlaveFirst) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { this.makeSureStateOK(); this.subscriptionAutomatically(mq.getTopic()); ConsumeMessageContext consumeMessageContext = null; consumeMessageContext = new ConsumeMessageContext(); consumeMessageContext.setConsumerGroup(this.groupName()); consumeMessageContext.setMq(mq); consumeMessageContext.setMsgList(pullResult.getMsgFoundList()); consumeMessageContext.setSuccess(false); this.executeHookBefore(consumeMessageContext); consumeMessageContext.setStatus(ConsumeConcurrentlyStatus.CONSUME_SUCCESS.toString()); consumeMessageContext.setSuccess(true); this.executeHookAfter(consumeMessageContext);
this.serviceState = ServiceState.START_FAILED; this.checkConfig(); this.copySubscription(); this.defaultMQPullConsumer.getConsumerGroup(), isUnitMode()); this.pullAPIWrapper.registerFilterMessageHook(filterMessageHookList);
@Override public Set<MessageQueue> fetchMessageQueuesInBalance(String topic) throws MQClientException { return this.defaultMQPullConsumerImpl.fetchMessageQueuesInBalance(topic); }
@Override public long fetchConsumeOffset(MessageQueue mq, boolean fromStore) throws MQClientException { return this.defaultMQPullConsumerImpl.fetchConsumeOffset(mq, fromStore); }
@Override public Set<MessageQueue> fetchSubscribeMessageQueues(String topic) throws MQClientException { return this.defaultMQPullConsumerImpl.fetchSubscribeMessageQueues(topic); }
private PullResult pullSyncImpl(MessageQueue mq, SubscriptionData subscriptionData, long offset, int maxNums, boolean block, long timeout) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { this.makeSureStateOK(); this.subscriptionAutomatically(mq.getTopic()); ConsumeMessageContext consumeMessageContext = null; consumeMessageContext = new ConsumeMessageContext(); consumeMessageContext.setConsumerGroup(this.groupName()); consumeMessageContext.setMq(mq); consumeMessageContext.setMsgList(pullResult.getMsgFoundList()); consumeMessageContext.setSuccess(false); this.executeHookBefore(consumeMessageContext); consumeMessageContext.setStatus(ConsumeConcurrentlyStatus.CONSUME_SUCCESS.toString()); consumeMessageContext.setSuccess(true); this.executeHookAfter(consumeMessageContext);
this.serviceState = ServiceState.START_FAILED; this.checkConfig(); this.copySubscription(); this.defaultMQPullConsumer.getConsumerGroup(), isUnitMode()); this.pullAPIWrapper.registerFilterMessageHook(filterMessageHookList);
public void createTopic(String key, String newTopic, int queueNum) throws MQClientException { createTopic(key, newTopic, queueNum, 0); }
public DefaultMQPullConsumer(final String consumerGroup, RPCHook rpcHook) { this.consumerGroup = consumerGroup; defaultMQPullConsumerImpl = new DefaultMQPullConsumerImpl(this, rpcHook); }
@Override public Set<MessageQueue> fetchMessageQueuesInBalance(String topic) throws MQClientException { return this.defaultMQPullConsumerImpl.fetchMessageQueuesInBalance(topic); }
@Override public long fetchConsumeOffset(MessageQueue mq, boolean fromStore) throws MQClientException { return this.defaultMQPullConsumerImpl.fetchConsumeOffset(mq, fromStore); }
@Override public Set<MessageQueue> fetchSubscribeMessageQueues(String topic) throws MQClientException { return this.defaultMQPullConsumerImpl.fetchSubscribeMessageQueues(topic); }