延时消息
订阅主题消息
见 主题的订阅
发送延时消息
参数说明:①主题名称 ②消息内容 ③延时多久,单位ms zhub.delay("topic-delay-a", "delay-value", 1000);
示例代码:
private ZHubClient zhub;
@RestMapping(name = "delay_test", auth = false, comment = "发送延时主题消息测试")
public String delayTest(String value) {
zhub.delay("topic-delay-a", "delay-value", 1000);
return "send ok!";
}