public class DefaultMQPushConsumerImpl extends Object implements MQConsumerInner
| 构造器和说明 |
|---|
DefaultMQPushConsumerImpl(DefaultMQPushConsumer defaultMQPushConsumer,
com.alibaba.rocketmq.remoting.RPCHook rpcHook) |
public DefaultMQPushConsumerImpl(DefaultMQPushConsumer defaultMQPushConsumer, com.alibaba.rocketmq.remoting.RPCHook rpcHook)
public void registerFilterMessageHook(FilterMessageHook hook)
public boolean hasHook()
public void registerConsumeMessageHook(ConsumeMessageHook hook)
public void executeHookBefore(ConsumeMessageContext context)
public void executeHookAfter(ConsumeMessageContext context)
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 Set<MessageQueue> fetchSubscribeMessageQueues(String topic) throws MQClientException
public DefaultMQPushConsumer getDefaultMQPushConsumer()
public long earliestMsgStoreTime(MessageQueue mq) throws MQClientException
public long maxOffset(MessageQueue mq) throws MQClientException
public long minOffset(MessageQueue mq) throws MQClientException
public OffsetStore getOffsetStore()
public void setOffsetStore(OffsetStore offsetStore)
public void pullMessage(PullRequest pullRequest)
public boolean isPause()
public void setPause(boolean pause)
public ConsumerStatsManager getConsumerStatsManager()
public void executePullRequestImmediately(PullRequest pullRequest)
public void executeTaskLater(Runnable r, long timeDelay)
public 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 void registerMessageListener(MessageListener messageListener)
public void resume()
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 shutdown()
public void start()
throws MQClientException
public MessageListener getMessageListenerInner()
public ConcurrentHashMap<String,SubscriptionData> getSubscriptionInner()
public void subscribe(String topic, String subExpression) throws MQClientException
public void subscribe(String topic, String fullClassName, String filterClassSource) throws MQClientException
public void suspend()
public void unsubscribe(String topic)
public void updateConsumeOffset(MessageQueue mq, long offset)
public void updateCorePoolSize(int corePoolSize)
public MessageExt viewMessage(String msgId) throws com.alibaba.rocketmq.remoting.exception.RemotingException, MQBrokerException, InterruptedException, MQClientException
com.alibaba.rocketmq.remoting.exception.RemotingExceptionMQBrokerExceptionInterruptedExceptionMQClientExceptionpublic RebalanceImpl getRebalanceImpl()
public boolean isConsumeOrderly()
public void setConsumeOrderly(boolean consumeOrderly)
public void resetOffsetByTimeStamp(long timeStamp)
throws com.alibaba.rocketmq.remoting.exception.RemotingException,
MQBrokerException,
InterruptedException,
MQClientException
com.alibaba.rocketmq.remoting.exception.RemotingExceptionMQBrokerExceptionInterruptedExceptionMQClientExceptionpublic long searchOffset(MessageQueue mq, long timestamp) throws MQClientException
public String groupName()
groupName 在接口中 MQConsumerInnerpublic 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 MQClientInstance getmQClientFactory()
public void setmQClientFactory(MQClientInstance mQClientFactory)
public ServiceState getServiceState()
public void setServiceState(ServiceState serviceState)
public void adjustThreadPool()
public List<QueueTimeSpan> queryConsumeTimeSpan(String topic) throws com.alibaba.rocketmq.remoting.exception.RemotingException, MQClientException, InterruptedException, MQBrokerException
com.alibaba.rocketmq.remoting.exception.RemotingExceptionMQClientExceptionInterruptedExceptionMQBrokerExceptionpublic ConsumeMessageService getConsumeMessageService()
public void setConsumeMessageService(ConsumeMessageService consumeMessageService)
Copyright © 2012–2016. All rights reserved.