INT-2034 clearing the replyTo address after it has been used (i.e. it is not copied along with the reply Message itself)

This commit is contained in:
Mark Fisher
2011-08-04 23:14:11 -04:00
parent 89bef1e6f6
commit ea19a7d5a2

View File

@@ -84,7 +84,9 @@ public class AmqpInboundGateway extends MessagingGatewaySupport {
amqpTemplate.convertAndSend(replyTo.getExchangeName(), replyTo.getRoutingKey(), reply.getPayload(),
new MessagePostProcessor() {
public Message postProcessMessage(Message message) throws AmqpException {
headerMapper.fromHeaders(reply.getHeaders(), message.getMessageProperties());
headerMapper.fromHeaders(reply.getHeaders(), message.getMessageProperties());
// clear the replyTo from the original message since we are using it now
message.getMessageProperties().setReplyTo(null);
return message;
}
});