apparently, when request timeout is set, the request only close the subscription without notify the caller. Should the Request provide a way to add/set a OnCloseListener/Handler?
//NatsImpl.java
@Override
public Request request(final String subject, String message, long timeout, TimeUnit unit, final Integer maxReplies, MessageHandler... messageHandlers) {
//...
final ScheduledExecutorService scheduler = (channel == null) ? eventLoopGroup.next() : channel.eventLoop();
scheduler.schedule(new Runnable() {
@Override
public void run() {
subscription.close();
}
}, timeout, unit);
// ...
apparently, when request timeout is set, the request only close the subscription without notify the caller. Should the Request provide a way to add/set a OnCloseListener/Handler?