@@ -167,6 +167,7 @@ public void testReplyContainerRecovery() throws Exception {
167
167
public void testConnectionBreakOnReplyMessageIdCorrelation () throws Exception {
168
168
CachingConnectionFactory connectionFactory1 = new CachingConnectionFactory (
169
169
new ActiveMQConnectionFactory ("vm://localhost?broker.persistent=false" ));
170
+ connectionFactory1 .setCacheConsumers (false );
170
171
final JmsOutboundGateway gateway = new JmsOutboundGateway ();
171
172
gateway .setConnectionFactory (connectionFactory1 );
172
173
String requestQ = "requests1" ;
@@ -183,6 +184,7 @@ public void testConnectionBreakOnReplyMessageIdCorrelation() throws Exception {
183
184
exec .execute (() -> gateway .handleMessage (new GenericMessage <String >("foo" )));
184
185
CachingConnectionFactory connectionFactory2 = new CachingConnectionFactory (
185
186
new ActiveMQConnectionFactory ("vm://localhost?broker.persistent=false" ));
187
+ connectionFactory2 .setCacheConsumers (false );
186
188
JmsTemplate template = new JmsTemplate (connectionFactory2 );
187
189
template .setReceiveTimeout (10000 );
188
190
template .afterPropertiesSet ();
@@ -208,6 +210,7 @@ public void testConnectionBreakOnReplyMessageIdCorrelation() throws Exception {
208
210
public void testConnectionBreakOnReplyCustomCorrelation () throws Exception {
209
211
CachingConnectionFactory connectionFactory1 = new CachingConnectionFactory (
210
212
new ActiveMQConnectionFactory ("vm://localhost?broker.persistent=false" ));
213
+ connectionFactory1 .setCacheConsumers (false );
211
214
final JmsOutboundGateway gateway = new JmsOutboundGateway ();
212
215
gateway .setConnectionFactory (connectionFactory1 );
213
216
String requestQ = "requests2" ;
@@ -225,6 +228,7 @@ public void testConnectionBreakOnReplyCustomCorrelation() throws Exception {
225
228
exec .execute (() -> gateway .handleMessage (new GenericMessage <String >("foo" )));
226
229
CachingConnectionFactory connectionFactory2 = new CachingConnectionFactory (
227
230
new ActiveMQConnectionFactory ("vm://localhost?broker.persistent=false" ));
231
+ connectionFactory2 .setCacheConsumers (false );
228
232
JmsTemplate template = new JmsTemplate (connectionFactory2 );
229
233
template .setReceiveTimeout (10000 );
230
234
template .afterPropertiesSet ();
0 commit comments