Make sure temp queues are closed
@@ -218,13 +218,16 @@ public class JMSConduit extends AbstractConduit implements JMSExchangeSender, Me
correlationMap.put(correlationId, exchange);
}
- if (exchange.isSynchronous()) {
+ if (!exchange.isSynchronous()) {
+ return;
+ }
+
+ try {
if (useSyncReceive) {
javax.jms.Message replyMessage = JMSUtil.receive(session, replyDestination,
correlationId,
jmsConfig.getReceiveTimeout(),
jmsConfig.isPubSubNoLocal());
- correlationMap.remove(correlationId);
processReplyMessage(exchange, replyMessage);
} else {
try {
@@ -238,6 +241,8 @@ public class JMSConduit extends AbstractConduit implements JMSExchangeSender, Me
}
}
+ } finally {
+ correlationMap.remove(correlationId);
}
}
}
