AMQP-178: make named queue durable by default

This commit is contained in:
Dave Syer
2011-07-12 10:40:40 +01:00
parent c39cea66ab
commit f1f7beba9c
3 changed files with 5 additions and 5 deletions

View File

@@ -34,12 +34,12 @@ public class Queue {
private final java.util.Map<java.lang.String, java.lang.Object> arguments;
/**
* The queue is non-durable, non-exclusive and non auto-delete.
* The queue is durable, non-exclusive and non auto-delete.
*
* @param name the name of the queue.
*/
public Queue(String name) {
this(name, false, false, false);
this(name, true, false, false);
}
/**

View File

@@ -49,10 +49,10 @@
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="durable" use="optional" type="xsd:boolean" default="false">
<xsd:attribute name="durable" use="optional" type="xsd:boolean" default="true">
<xsd:annotation>
<xsd:documentation><![CDATA[
Flag indicating that the queue is durable, meaning that it will survive broker restarts (not that the messages in it will, although they might if they are persistent). Default is false.
Flag indicating that the queue is durable, meaning that it will survive broker restarts (not that the messages in it will, although they might if they are persistent). Default is true.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>

View File

@@ -41,7 +41,7 @@ public final class QueueParserTests {
Queue queue = beanFactory.getBean("foo", Queue.class);
assertNotNull(queue);
assertEquals("foo", queue.getName());
assertFalse(queue.isDurable());
assertTrue(queue.isDurable());
assertFalse(queue.isAutoDelete());
assertFalse(queue.isExclusive());
}