public void unregisterConsumer(MessageConsumer<Object> mc) {
mc.unregister(result -> {
if(result.succeeded())
return;
else
//uh oh
});
}
万一出现故障AsyncResult
,再次调用可能是不明智的unregisterConsumer
,也许是vertx.setTimer(5000, id -> unregisterConsumer(mc));
?