public interface MQAdmin
Modifier and Type | Method and Description |
---|---|
void |
createTopic(java.lang.String key,
java.lang.String newTopic,
int queueNum)
Creates an topic
|
void |
createTopic(java.lang.String key,
java.lang.String newTopic,
int queueNum,
int topicSysFlag)
Creates an topic
|
long |
earliestMsgStoreTime(MessageQueue mq)
Gets the earliest stored message time
|
long |
maxOffset(MessageQueue mq)
Gets the max offset
|
long |
minOffset(MessageQueue mq)
Gets the minimum offset
|
QueryResult |
queryMessage(java.lang.String topic,
java.lang.String key,
int maxNum,
long begin,
long end)
Query messages
|
long |
searchOffset(MessageQueue mq,
long timestamp)
Gets the message queue offset according to some time in milliseconds
be cautious to call because of more IO overhead |
MessageExt |
viewMessage(java.lang.String offsetMsgId)
Query message according tto message id
|
MessageExt |
viewMessage(java.lang.String topic,
java.lang.String msgId) |
void createTopic(java.lang.String key, java.lang.String newTopic, int queueNum) throws MQClientException
key
- accesskeynewTopic
- topic namequeueNum
- topic's queue numberMQClientException
void createTopic(java.lang.String key, java.lang.String newTopic, int queueNum, int topicSysFlag) throws MQClientException
key
- accesskeynewTopic
- topic namequeueNum
- topic's queue numbertopicSysFlag
- topic system flagMQClientException
long searchOffset(MessageQueue mq, long timestamp) throws MQClientException
mq
- Instance of MessageQueuetimestamp
- from when in milliseconds.MQClientException
long maxOffset(MessageQueue mq) throws MQClientException
mq
- Instance of MessageQueueMQClientException
long minOffset(MessageQueue mq) throws MQClientException
mq
- Instance of MessageQueueMQClientException
long earliestMsgStoreTime(MessageQueue mq) throws MQClientException
mq
- Instance of MessageQueueMQClientException
MessageExt viewMessage(java.lang.String offsetMsgId) throws RemotingException, MQBrokerException, java.lang.InterruptedException, MQClientException
offsetMsgId
- message idjava.lang.InterruptedException
MQBrokerException
RemotingException
MQClientException
QueryResult queryMessage(java.lang.String topic, java.lang.String key, int maxNum, long begin, long end) throws MQClientException, java.lang.InterruptedException
topic
- message topickey
- message key index wordmaxNum
- max message numberbegin
- from whenend
- to whenMQClientException
java.lang.InterruptedException
MessageExt viewMessage(java.lang.String topic, java.lang.String msgId) throws RemotingException, MQBrokerException, java.lang.InterruptedException, MQClientException
topic
- msgId
- MessageExt
of given msgIdRemotingException
MQBrokerException
java.lang.InterruptedException
MQClientException