public class DefaultMQPullConsumerImpl extends Object implements MQConsumerInner
| 构造器和说明 |
|---|
DefaultMQPullConsumerImpl(DefaultMQPullConsumer defaultMQPullConsumer,
com.alibaba.rocketmq.remoting.RPCHook rpcHook) |
public DefaultMQPullConsumerImpl(DefaultMQPullConsumer defaultMQPullConsumer, com.alibaba.rocketmq.remoting.RPCHook rpcHook)
public void registerConsumeMessageHook(ConsumeMessageHook hook)
public void createTopic(String key, String newTopic, int queueNum) throws MQClientException
public void createTopic(String key, String newTopic, int queueNum, int topicSysFlag) throws MQClientException
public long fetchConsumeOffset(MessageQueue mq, boolean fromStore) throws MQClientException
public Set<MessageQueue> fetchMessageQueuesInBalance(String topic) throws MQClientException
public List<MessageQueue> fetchPublishMessageQueues(String topic) throws MQClientException
public Set<MessageQueue> fetchSubscribeMessageQueues(String topic) throws MQClientException
public long earliestMsgStoreTime(MessageQueue mq) throws MQClientException
public long maxOffset(MessageQueue mq) throws MQClientException
public long minOffset(MessageQueue mq) throws MQClientException
public PullResult pull(MessageQueue mq, String subExpression, long offset, int maxNums) throws MQClientException, com.alibaba.rocketmq.remoting.exception.RemotingException, MQBrokerException, InterruptedException
MQClientExceptioncom.alibaba.rocketmq.remoting.exception.RemotingExceptionMQBrokerExceptionInterruptedExceptionpublic PullResult pull(MessageQueue mq, String subExpression, long offset, int maxNums, long timeout) throws MQClientException, com.alibaba.rocketmq.remoting.exception.RemotingException, MQBrokerException, InterruptedException
MQClientExceptioncom.alibaba.rocketmq.remoting.exception.RemotingExceptionMQBrokerExceptionInterruptedExceptionpublic String groupName()
groupName 在接口中 MQConsumerInnerpublic void executeHookBefore(ConsumeMessageContext context)
public void executeHookAfter(ConsumeMessageContext context)
public MessageModel messageModel()
messageModel 在接口中 MQConsumerInnerpublic ConsumeType consumeType()
consumeType 在接口中 MQConsumerInnerpublic ConsumeFromWhere consumeFromWhere()
consumeFromWhere 在接口中 MQConsumerInnerpublic Set<SubscriptionData> subscriptions()
subscriptions 在接口中 MQConsumerInnerpublic void doRebalance()
doRebalance 在接口中 MQConsumerInnerpublic void persistConsumerOffset()
persistConsumerOffset 在接口中 MQConsumerInnerpublic void updateTopicSubscribeInfo(String topic, Set<MessageQueue> info)
updateTopicSubscribeInfo 在接口中 MQConsumerInnerpublic boolean isSubscribeTopicNeedUpdate(String topic)
isSubscribeTopicNeedUpdate 在接口中 MQConsumerInnerpublic boolean isUnitMode()
isUnitMode 在接口中 MQConsumerInnerpublic ConsumerRunningInfo consumerRunningInfo()
consumerRunningInfo 在接口中 MQConsumerInnerpublic void pull(MessageQueue mq, String subExpression, long offset, int maxNums, PullCallback pullCallback) throws MQClientException, com.alibaba.rocketmq.remoting.exception.RemotingException, InterruptedException
MQClientExceptioncom.alibaba.rocketmq.remoting.exception.RemotingExceptionInterruptedExceptionpublic void pull(MessageQueue mq, String subExpression, long offset, int maxNums, PullCallback pullCallback, long timeout) throws MQClientException, com.alibaba.rocketmq.remoting.exception.RemotingException, InterruptedException
MQClientExceptioncom.alibaba.rocketmq.remoting.exception.RemotingExceptionInterruptedExceptionpublic PullResult pullBlockIfNotFound(MessageQueue mq, String subExpression, long offset, int maxNums) throws MQClientException, com.alibaba.rocketmq.remoting.exception.RemotingException, MQBrokerException, InterruptedException
MQClientExceptioncom.alibaba.rocketmq.remoting.exception.RemotingExceptionMQBrokerExceptionInterruptedExceptionpublic DefaultMQPullConsumer getDefaultMQPullConsumer()
public void pullBlockIfNotFound(MessageQueue mq, String subExpression, long offset, int maxNums, PullCallback pullCallback) throws MQClientException, com.alibaba.rocketmq.remoting.exception.RemotingException, InterruptedException
MQClientExceptioncom.alibaba.rocketmq.remoting.exception.RemotingExceptionInterruptedExceptionpublic QueryResult queryMessage(String topic, String key, int maxNum, long begin, long end) throws MQClientException, InterruptedException
public MessageExt queryMessageByUniqKey(String topic, String uniqKey) throws MQClientException, InterruptedException
public long searchOffset(MessageQueue mq, long timestamp) throws MQClientException
public void sendMessageBack(MessageExt msg, int delayLevel, String brokerName) throws com.alibaba.rocketmq.remoting.exception.RemotingException, MQBrokerException, InterruptedException, MQClientException
com.alibaba.rocketmq.remoting.exception.RemotingExceptionMQBrokerExceptionInterruptedExceptionMQClientExceptionpublic void sendMessageBack(MessageExt msg, int delayLevel, String brokerName, String consumerGroup) throws com.alibaba.rocketmq.remoting.exception.RemotingException, MQBrokerException, InterruptedException, MQClientException
com.alibaba.rocketmq.remoting.exception.RemotingExceptionMQBrokerExceptionInterruptedExceptionMQClientExceptionpublic void shutdown()
public void start()
throws MQClientException
public void updateConsumeOffset(MessageQueue mq, long offset) throws MQClientException
public MessageExt viewMessage(String msgId) throws com.alibaba.rocketmq.remoting.exception.RemotingException, MQBrokerException, InterruptedException, MQClientException
com.alibaba.rocketmq.remoting.exception.RemotingExceptionMQBrokerExceptionInterruptedExceptionMQClientExceptionpublic void registerFilterMessageHook(FilterMessageHook hook)
public OffsetStore getOffsetStore()
public void setOffsetStore(OffsetStore offsetStore)
public PullAPIWrapper getPullAPIWrapper()
public void setPullAPIWrapper(PullAPIWrapper pullAPIWrapper)
public ServiceState getServiceState()
public void setServiceState(ServiceState serviceState)
public long getConsumerStartTimestamp()
public RebalanceImpl getRebalanceImpl()
Copyright © 2012–2016. All rights reserved.