protected void doHandleResult(InvocationResult resultArg, Message request, Channel channel, Object source) { if (this.logger.isDebugEnabled()) { this.logger.debug("Listener method returned result [" + resultArg + "] - generating response message for it"); } try { Message response = buildMessage(channel, resultArg.getReturnValue(), resultArg.getReturnType()); postProcessResponse(request, response); Address replyTo = getReplyToAddress(request, source, resultArg); sendResponse(channel, replyTo, response); } catch (Exception ex) { throw new ReplyFailureException("Failed to send reply with payload '" + resultArg + "'", ex); } }
protected void doHandleResult(InvocationResult resultArg, Message request, Channel channel, Object source) { if (this.logger.isDebugEnabled()) { this.logger.debug("Listener method returned result [" + resultArg + "] - generating response message for it"); } try { Message response = buildMessage(channel, resultArg.getReturnValue(), resultArg.getReturnType()); postProcessResponse(request, response); Address replyTo = getReplyToAddress(request, source, resultArg); sendResponse(channel, replyTo, response); } catch (Exception ex) { throw new ReplyFailureException("Failed to send reply with payload '" + resultArg + "'", ex); } }
private void asyncSuccess(InvocationResult resultArg, Message request, Channel channel, Object source, Object r) { doHandleResult(new InvocationResult(r, resultArg.getSendTo(), resultArg.getReturnType()), request, channel, source); try { channel.basicAck(request.getMessageProperties().getDeliveryTag(), false); } catch (IOException e) { this.logger.error("Failed to nack message", e); } }
private void asyncSuccess(InvocationResult resultArg, Message request, Channel channel, Object source, Object r) { doHandleResult(new InvocationResult(r, resultArg.getSendTo(), resultArg.getReturnType()), request, channel, source); try { channel.basicAck(request.getMessageProperties().getDeliveryTag(), false); } catch (IOException e) { this.logger.error("Failed to nack message", e); } }