This commit is contained in:
Mark Fisher
2008-11-26 08:45:29 +00:00
parent a2ebf9fea5
commit b5c7f70af2

View File

@@ -35,7 +35,9 @@ import org.springframework.integration.channel.MessageChannelTemplate;
import org.springframework.integration.context.IntegrationContextUtils;
import org.springframework.integration.core.Message;
import org.springframework.integration.core.MessageChannel;
import org.springframework.integration.core.MessageHeaders;
import org.springframework.integration.handler.AbstractMessageHandler;
import org.springframework.integration.message.MessageBuilder;
import org.springframework.integration.message.MessageHandler;
import org.springframework.integration.message.MessageHandlingException;
import org.springframework.integration.scheduling.IntervalTrigger;
@@ -266,6 +268,11 @@ public abstract class AbstractMessageBarrierHandler<T extends Map<K, Message<?>>
}
}
if (replyChannel != null) {
if (defaultReplyChannel != null && !defaultReplyChannel.equals(replyChannel)) {
message = MessageBuilder.fromMessage(message)
.setHeaderIfAbsent(MessageHeaders.REPLY_CHANNEL, defaultReplyChannel)
.build();
}
this.channelTemplate.send(message, replyChannel);
}
else if (logger.isWarnEnabled()) {