INT-1513 default send timeout for all handlers that extend AbstractReplyProducingMessageHandler is now that of the underlying MessagingTemplate (-1, indefinite). It can of course be changed via setSendTimeout(long).
This commit is contained in:
@@ -37,9 +37,6 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public abstract class AbstractReplyProducingMessageHandler extends AbstractMessageHandler implements MessageProducer {
|
||||
|
||||
public static final long DEFAULT_SEND_TIMEOUT = 1000;
|
||||
|
||||
|
||||
private MessageChannel outputChannel;
|
||||
|
||||
private volatile boolean requiresReply = false;
|
||||
@@ -49,7 +46,6 @@ public abstract class AbstractReplyProducingMessageHandler extends AbstractMessa
|
||||
|
||||
public AbstractReplyProducingMessageHandler() {
|
||||
this.messagingTemplate = new MessagingTemplate();
|
||||
this.messagingTemplate.setSendTimeout(DEFAULT_SEND_TIMEOUT);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ public class HeaderEnricherParserTests {
|
||||
public void sendTimeoutDefault() {
|
||||
Object endpoint = context.getBean("headerEnricherWithDefaults");
|
||||
long sendTimeout = TestUtils.getPropertyValue(endpoint, "handler.messagingTemplate.sendTimeout", Long.class).longValue();
|
||||
assertEquals(1000L, sendTimeout);
|
||||
assertEquals(-1L, sendTimeout);
|
||||
}
|
||||
|
||||
@Test // INT-1154
|
||||
|
||||
Reference in New Issue
Block a user