This commit is contained in:
@@ -80,12 +80,16 @@ public class MessageClient {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (convertType != null) message.setFormat(convertType);
|
if (convertType != null) message.setFormat(convertType);
|
||||||
if (needresp && message.getResptopic() == null) message.setResptopic(respTopic);
|
if (needresp && (message.getResptopic() == null || message.getResptopic().isEmpty())) {
|
||||||
messageAgent.getProducer().apply(message);
|
message.setResptopic(respTopic);
|
||||||
|
}
|
||||||
if (counter != null) counter.incrementAndGet();
|
if (counter != null) counter.incrementAndGet();
|
||||||
|
messageAgent.getProducer().apply(message);
|
||||||
if (needresp) {
|
if (needresp) {
|
||||||
MessageRespFutureNode node = new MessageRespFutureNode(message.getSeqid(), counter, future);
|
MessageRespFutureNode node = new MessageRespFutureNode(message.getSeqid(), counter, future);
|
||||||
respNodes.put(message.getSeqid(), node);
|
respNodes.put(message.getSeqid(), node);
|
||||||
|
} else {
|
||||||
|
future.complete(null);
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
future.completeExceptionally(ex);
|
future.completeExceptionally(ex);
|
||||||
|
|||||||
Reference in New Issue
Block a user