Author: raulk
Date: Tue Jan 15 23:53:46 2013
New Revision: 1433746
URL: http://svn.apache.org/viewvc?rev=1433746&view=rev
Log:
CAMEL-5865 Honour replyToCacheLevelName, otherwise fallback to CACHE_CONSUMER
Modified:
camel/branches/camel-2.10.x/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/TemporaryQueueReplyManager.java
Modified:
camel/branches/camel-2.10.x/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/TemporaryQueueReplyManager.java
URL:
http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/TemporaryQueueReplyManager.java?rev=1433746&r1=1433745&r2=1433746&view=diff
==============================================================================
---
camel/branches/camel-2.10.x/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/TemporaryQueueReplyManager.java
(original)
+++
camel/branches/camel-2.10.x/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/TemporaryQueueReplyManager.java
Tue Jan 15 23:53:46 2013
@@ -120,9 +120,13 @@ public class TemporaryQueueReplyManager
answer.setMaxConcurrentConsumers(endpoint.getMaxConcurrentConsumers());
}
answer.setConnectionFactory(endpoint.getConnectionFactory());
- // we use CACHE_CONSUMER to cling to the consumer as long as we can,
since we can only consume
+ // we use CACHE_CONSUMER by default to cling to the consumer as long
as we can, since we can only consume
// msgs from the JMS Connection that created the temp destination in
the first place
- answer.setCacheLevel(DefaultMessageListenerContainer.CACHE_CONSUMER);
+ if (endpoint.getReplyToCacheLevelName() != null) {
+ answer.setCacheLevelName(endpoint.getReplyToCacheLevelName());
+ } else {
+
answer.setCacheLevel(DefaultMessageListenerContainer.CACHE_CONSUMER);
+ }
String clientId = endpoint.getClientId();
if (clientId != null) {
clientId += ".CamelReplyManager";