QPID-7694:[Broker-J][AMQP 0-8..0-10] Allow specifying queue wire argument 'qpid.last_...
authorAlex Rudyy <orudyy@apache.org>
Mon, 10 Dec 2018 15:59:45 +0000 (15:59 +0000)
committerAlex Rudyy <orudyy@apache.org>
Mon, 10 Dec 2018 15:59:45 +0000 (15:59 +0000)
broker-core/src/main/java/org/apache/qpid/server/queue/QueueArgumentsConverter.java

index 0c01d52..05330eb 100644 (file)
@@ -169,9 +169,13 @@ public class QueueArgumentsConverter
                     wireArgumentNames.remove(entry.getKey());
                 }
             }
-            if(wireArguments.containsKey(QPID_LAST_VALUE_QUEUE) && !wireArguments.containsKey(QPID_LAST_VALUE_QUEUE_KEY))
+            if(wireArguments.containsKey(QPID_LAST_VALUE_QUEUE))
             {
-                modelArguments.put(LastValueQueue.LVQ_KEY, LastValueQueue.DEFAULT_LVQ_KEY);
+                wireArgumentNames.remove(QPID_LAST_VALUE_QUEUE);
+                if (!wireArguments.containsKey(QPID_LAST_VALUE_QUEUE_KEY))
+                {
+                    modelArguments.put(LastValueQueue.LVQ_KEY, LastValueQueue.DEFAULT_LVQ_KEY);
+                }
             }
             if(wireArguments.containsKey(QPID_POLICY_TYPE))
             {