|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
public interface MQAdmin
MQ管理类接口
| 方法摘要 | |
|---|---|
void |
createTopic(String key,
String newTopic,
int queueNum)
创建topic |
long |
earliestMsgStoreTime(MessageQueue mq)
向服务器查询队列保存的最早消息对应的存储时间 |
long |
maxOffset(MessageQueue mq)
向服务器查询队列最大Offset PS: 最大Offset无对应消息,减1有消息 |
long |
minOffset(MessageQueue mq)
向服务器查询队列最小Offset PS: 最小Offset有对应消息 |
QueryResult |
queryMessage(String topic,
String key,
int maxNum,
long begin,
long end)
根据消息Key查询消息 |
long |
searchOffset(MessageQueue mq,
long timestamp)
根据时间查询对应的offset,精确到毫秒 P.S. |
MessageExt |
viewMessage(String msgId)
根据消息ID,从服务器获取完整的消息 |
| 方法详细信息 |
|---|
void createTopic(String key,
String newTopic,
int queueNum)
throws MQClientException
key - 请向运维人员申请newTopic - 要创建的新topicqueueNum - 新topic队列数
MQClientException
long searchOffset(MessageQueue mq,
long timestamp)
throws MQClientException
mq - 队列timestamp - 毫秒形式时间戳
MQClientException
long maxOffset(MessageQueue mq)
throws MQClientException
mq - 队列
MQClientException
long minOffset(MessageQueue mq)
throws MQClientException
mq - 队列
MQClientException
long earliestMsgStoreTime(MessageQueue mq)
throws MQClientException
mq - 队列
MQClientException
MessageExt viewMessage(String msgId)
throws RemotingException,
MQBrokerException,
InterruptedException,
MQClientException
msgId -
InterruptedException
MQBrokerException
RemotingException
MQClientException
QueryResult queryMessage(String topic,
String key,
int maxNum,
long begin,
long end)
throws MQClientException,
InterruptedException
topic - 消息主题key - 消息关键词maxNum - 查询最大条数begin - 起始时间戳end - 结束时间戳
MQClientException
InterruptedException
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||