AMQP IO Platform Brussels Compatibility
https://build.spring.io/browse/INT-MJATS41-884/ The gateway must start the template.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016 the original author or authors.
|
||||
* Copyright 2016-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -58,6 +58,18 @@ public class AsyncAmqpOutboundGateway extends AbstractAmqpOutboundEndpoint {
|
||||
return "amqp:outbound-async-gateway";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doStart() {
|
||||
super.doStart();
|
||||
this.template.start();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doStop() {
|
||||
this.template.stop();
|
||||
super.doStop();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Object handleRequestMessage(Message<?> requestMessage) {
|
||||
org.springframework.amqp.core.Message amqpMessage = MappingUtils.mapMessage(requestMessage,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -106,6 +106,7 @@ public class OutboundEndpointTests {
|
||||
gateway.setBeanFactory(mock(BeanFactory.class));
|
||||
gateway.setOutputChannel(new NullChannel());
|
||||
gateway.afterPropertiesSet();
|
||||
gateway.start();
|
||||
ArgumentCaptor<Message> captor = ArgumentCaptor.forClass(Message.class);
|
||||
gateway.handleMessage(new GenericMessage<>("foo"));
|
||||
verify(amqpTemplate).sendAndReceive(eq("foo"), eq("bar"), captor.capture());
|
||||
|
||||
Reference in New Issue
Block a user