rocketmq
rocketmq copied to clipboard
About the querymessage method of MQAdmin.java
/**
* Query messages
*
* @param topic message topic
* @param key message key index word
* @param maxNum max message number
* @param begin from when
* @param end to when
* @return Instance of QueryResult
*/
QueryResult queryMessage(final String topic, final String key, final int maxNum, final long begin,
final long end) throws MQClientException, InterruptedException;
When I test, the key cannot be "" or null, If the key can be empty, it will be much more convenient to query the message according to the time
我测试的时候,发现参数key不能为空或者null 如果key可以为空,根据时间查询消息会方便很多。