You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rg...@apache.org on 2019/12/24 10:08:51 UTC

[qpid-broker-j] branch master updated (66eabc0 -> 016079c)

This is an automated email from the ASF dual-hosted git repository.

rgodfrey pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-broker-j.git.


    from 66eabc0  QPID-8389 : [Broker-J] Support the ability to limit the number of active consumers
     new 4a9a435  QPID-8392 : Remove docs references to outdated DLQ configuration
     new 016079c  QPID-8392 : Update node auto-creation to aid with automated DLQs

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../qpid/server/exchange/AbstractExchange.java     |  2 +-
 .../qpid/server/exchange/DefaultDestination.java   |  2 +-
 .../qpid/server/model/AttributeValueConverter.java |  4 +++
 .../qpid/server/model/DestinationAddress.java      |  9 +++++--
 .../qpid/server/model/NamedAddressSpace.java       |  2 --
 .../java/org/apache/qpid/server/model/Queue.java   | 15 ++++++++---
 .../apache/qpid/server/queue/QueueEntryImpl.java   |  4 +++
 .../AbstractNonConnectionAcceptingVirtualHost.java |  6 -----
 .../server/virtualhost/AbstractVirtualHost.java    |  8 +-----
 .../manager/KerberosAuthenticationManagerTest.java |  5 ++--
 .../access/config/LegacyAccessControlAdapter.java  |  3 +--
 .../protocol/v0_10/ServerSessionDelegate.java      | 30 +++++++++++-----------
 .../PropertyConverter_Internal_to_v0_10Test.java   | 19 ++++++++------
 .../protocol/v0_10/ServerSessionDelegateTest.java  |  6 +++--
 .../qpid/server/protocol/v0_8/AMQChannel.java      | 21 ++++++++-------
 .../qpid/server/protocol/v0_8/AMQChannelTest.java  |  5 ++--
 .../PropertyConverter_Internal_to_v0_8Test.java    | 21 ++++++++-------
 .../protocol/v1_0/AnonymousRelayDestination.java   |  2 +-
 .../qpid/server/protocol/v1_0/Session_1_0.java     |  4 +--
 .../PropertyConverter_1_0_to_0_10Test.java         | 23 +++++++++--------
 .../v0_8_v0_10/MessageConverter_0_10_to_0_8.java   |  2 +-
 .../PropertyConverter_1_0_to_0_8Test.java          | 21 ++++++++-------
 .../management/amqp/ManagementAddressSpace.java    | 10 ++------
 ...Broker-Appendix-Queue-Declaration-Arguments.xml |  9 -------
 .../Java-Broker-Appendix-System-Properties.xml     |  6 -----
 ...ker-Runtime-Handling-Undeliverable-Messages.xml | 21 ++++++++++++++-
 26 files changed, 141 insertions(+), 119 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[qpid-broker-j] 01/02: QPID-8392 : Remove docs references to outdated DLQ configuration

Posted by rg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rgodfrey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-broker-j.git

commit 4a9a435fa6a5ebd01935ff68d692e164f85d94c5
Author: rgodfrey <rg...@apache.org>
AuthorDate: Mon Dec 23 15:40:39 2019 +0100

    QPID-8392 : Remove docs references to outdated DLQ configuration
---
 .../apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java | 4 ++--
 .../java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java    | 4 ++--
 .../docbkx/Java-Broker-Appendix-Queue-Declaration-Arguments.xml  | 9 ---------
 .../src/docbkx/Java-Broker-Appendix-System-Properties.xml        | 6 ------
 4 files changed, 4 insertions(+), 19 deletions(-)

diff --git a/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java b/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java
index da95578..97fceb2 100644
--- a/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java
+++ b/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java
@@ -959,7 +959,7 @@ public class ServerSessionDelegate extends MethodDelegate<ServerSession> impleme
                     exception(session,
                               method,
                               ExecutionErrorCode.NOT_FOUND,
-                              String.format("Unknown alternate exchange '%s'", e.getAlternateBindingName()));
+                              String.format("Unknown alternate destination '%s'", e.getAlternateBindingName()));
                 }
                 catch(NoFactoryForTypeException e)
                 {
@@ -1658,7 +1658,7 @@ public class ServerSessionDelegate extends MethodDelegate<ServerSession> impleme
                 exception(session,
                           method,
                           ExecutionErrorCode.NOT_FOUND,
-                          String.format("Unknown alternate exchange '%s'", e.getAlternateBindingName()));
+                          String.format("Unknown alternate destination '%s'", e.getAlternateBindingName()));
             }
             catch (IllegalArgumentException | IllegalConfigurationException e)
             {
diff --git a/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java b/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java
index 152e919..4c4ebd2 100644
--- a/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java
+++ b/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java
@@ -2701,7 +2701,7 @@ public class AMQChannel extends AbstractAMQPSession<AMQChannel, ConsumerTarget_0
                 }
                 catch (UnknownAlternateBindingException e)
                 {
-                    final String message = String.format("Unknown alternate exchange '%s'", e.getAlternateBindingName());
+                    final String message = String.format("Unknown alternate destination '%s'", e.getAlternateBindingName());
                     _connection.sendConnectionClose(ErrorCodes.NOT_FOUND, message, getChannelId());
 
                 }
@@ -3155,7 +3155,7 @@ public class AMQChannel extends AbstractAMQPSession<AMQChannel, ConsumerTarget_0
             }
             catch (UnknownAlternateBindingException e)
             {
-                final String message = String.format("Unknown alternate exchange: '%s'", e.getAlternateBindingName());
+                final String message = String.format("Unknown alternate destination: '%s'", e.getAlternateBindingName());
                 _connection.sendConnectionClose(ErrorCodes.NOT_FOUND, message, getChannelId());
             }
             catch (IllegalArgumentException | IllegalConfigurationException e)
diff --git a/doc/java-broker/src/docbkx/Java-Broker-Appendix-Queue-Declaration-Arguments.xml b/doc/java-broker/src/docbkx/Java-Broker-Appendix-Queue-Declaration-Arguments.xml
index ad90280..5905e75 100644
--- a/doc/java-broker/src/docbkx/Java-Broker-Appendix-Queue-Declaration-Arguments.xml
+++ b/doc/java-broker/src/docbkx/Java-Broker-Appendix-Queue-Declaration-Arguments.xml
@@ -161,15 +161,6 @@ my-queue; {create: always, node: {x-declare: {arguments:{'x-qpid-capacity': 1024
                         <para>Specifies this queue's maximum delivery count.</para>
                     </entry>
                 </row>
-                <row xml:id="Java-Broker-Appendix-Queue-Declare-Arguments-X-Qpid-DLQ-Enabled">
-                    <entry>
-                        <para>x-qpid-dlq-enabled</para>
-                    </entry>
-                    <entry>
-                        <para>If set <literal>true</literal>, a dead letter queue will be automatically created
-                        and assigned as this queue's <literal>alternateBinding</literal>.</para>
-                    </entry>
-                </row>
                 <row xml:id="Java-Broker-Appendix-Queue-Declare-Arguments-X-Single-Active-Consumer">
                     <entry>
                         <para>x-single-active-consumer</para>
diff --git a/doc/java-broker/src/docbkx/Java-Broker-Appendix-System-Properties.xml b/doc/java-broker/src/docbkx/Java-Broker-Appendix-System-Properties.xml
index 561061d..9929dbf 100644
--- a/doc/java-broker/src/docbkx/Java-Broker-Appendix-System-Properties.xml
+++ b/doc/java-broker/src/docbkx/Java-Broker-Appendix-System-Properties.xml
@@ -43,12 +43,6 @@
           <entry>Factor to determine the maximum length of that may elapse between heartbeats being
             received from the peer before a connection is deemed to have been broken.</entry>
         </row>
-        <row xml:id="Java-Broker-Appendix-System-Properties-Broker-Dead-Letter-Queue-Suffix">
-          <entry>qpid.broker_dead_letter_queue_suffix</entry>
-          <entry>_DLQ</entry>
-          <entry>Used with the <xref linkend="Java-Broker-Runtime-Handling-Undeliverable-Messages-Dead-Letter-Queues"/>
-            feature. Governs the suffix used when generating a name for a Dead Letter Queue.</entry>
-        </row>
         <row xml:id="Java-Broker-Appendix-System-Properties-Broker-Status-Updates">
           <entry>qpid.broker_status_updates</entry>
           <entry>true</entry>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[qpid-broker-j] 02/02: QPID-8392 : Update node auto-creation to aid with automated DLQs

Posted by rg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rgodfrey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-broker-j.git

commit 016079c70a73644128acdf5afeccd67bd5937754
Author: rgodfrey <rg...@apache.org>
AuthorDate: Tue Dec 24 10:53:30 2019 +0100

    QPID-8392 : Update node auto-creation to aid with automated DLQs
    
    * Allow for defaulting queue alternate bindings.
    * Only auto create nodes when client is looking for the node or trying to use it
    * Allow for auto creation on routing to the alternate binding
    * Document how to use defaulting and node auto creation policy to set up automated DLQs
---
 .../qpid/server/exchange/AbstractExchange.java     |  2 +-
 .../qpid/server/exchange/DefaultDestination.java   |  2 +-
 .../qpid/server/model/AttributeValueConverter.java |  4 ++++
 .../qpid/server/model/DestinationAddress.java      |  9 ++++++--
 .../qpid/server/model/NamedAddressSpace.java       |  2 --
 .../java/org/apache/qpid/server/model/Queue.java   | 15 +++++++++----
 .../apache/qpid/server/queue/QueueEntryImpl.java   |  4 ++++
 .../AbstractNonConnectionAcceptingVirtualHost.java |  6 -----
 .../server/virtualhost/AbstractVirtualHost.java    |  8 +------
 .../manager/KerberosAuthenticationManagerTest.java |  5 +++--
 .../access/config/LegacyAccessControlAdapter.java  |  3 +--
 .../protocol/v0_10/ServerSessionDelegate.java      | 26 +++++++++++-----------
 .../PropertyConverter_Internal_to_v0_10Test.java   | 19 +++++++++-------
 .../protocol/v0_10/ServerSessionDelegateTest.java  |  6 +++--
 .../qpid/server/protocol/v0_8/AMQChannel.java      | 17 ++++++++------
 .../qpid/server/protocol/v0_8/AMQChannelTest.java  |  5 +++--
 .../PropertyConverter_Internal_to_v0_8Test.java    | 21 +++++++++--------
 .../protocol/v1_0/AnonymousRelayDestination.java   |  2 +-
 .../qpid/server/protocol/v1_0/Session_1_0.java     |  4 ++--
 .../PropertyConverter_1_0_to_0_10Test.java         | 23 ++++++++++---------
 .../v0_8_v0_10/MessageConverter_0_10_to_0_8.java   |  2 +-
 .../PropertyConverter_1_0_to_0_8Test.java          | 21 +++++++++--------
 .../management/amqp/ManagementAddressSpace.java    | 10 ++-------
 ...ker-Runtime-Handling-Undeliverable-Messages.xml | 21 ++++++++++++++++-
 24 files changed, 137 insertions(+), 100 deletions(-)

diff --git a/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java b/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
index c6a7a95..26a1009 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
@@ -794,7 +794,7 @@ public abstract class AbstractExchange<T extends AbstractExchange<T>>
     private MessageDestination getAttainedMessageDestination(final String name)
     {
         MessageDestination destination = getVirtualHost().getAttainedQueue(name);
-        return destination == null ? getVirtualHost().getAttainedMessageDestination(name) : destination;
+        return destination == null ? getVirtualHost().getAttainedMessageDestination(name, false) : destination;
     }
 
     private MessageDestination getOpenedMessageDestination(final String name)
diff --git a/broker-core/src/main/java/org/apache/qpid/server/exchange/DefaultDestination.java b/broker-core/src/main/java/org/apache/qpid/server/exchange/DefaultDestination.java
index 8b94c60..1206889 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/exchange/DefaultDestination.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/exchange/DefaultDestination.java
@@ -99,7 +99,7 @@ public class DefaultDestination implements MessageDestination, PermissionedObjec
     {
         RoutingResult<M> result = new RoutingResult<>(message);
 
-        DestinationAddress destinationAddress = new DestinationAddress(_virtualHost, routingAddress);
+        DestinationAddress destinationAddress = new DestinationAddress(_virtualHost, routingAddress, true);
         MessageDestination messageDestination = destinationAddress.getMessageDestination();
         if (messageDestination != null)
         {
diff --git a/broker-core/src/main/java/org/apache/qpid/server/model/AttributeValueConverter.java b/broker-core/src/main/java/org/apache/qpid/server/model/AttributeValueConverter.java
index b0f50ab..43fe10e 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/model/AttributeValueConverter.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/model/AttributeValueConverter.java
@@ -1418,6 +1418,10 @@ abstract class AttributeValueConverter<T>
             else if(value instanceof String)
             {
                 String interpolated = AbstractConfiguredObject.interpolate(object, (String) value);
+                if(interpolated.trim().isEmpty())
+                {
+                    return null;
+                }
                 ObjectMapper objectMapper = new ObjectMapper();
                 try
                 {
diff --git a/broker-core/src/main/java/org/apache/qpid/server/model/DestinationAddress.java b/broker-core/src/main/java/org/apache/qpid/server/model/DestinationAddress.java
index 2a73ec3..47e35ba 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/model/DestinationAddress.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/model/DestinationAddress.java
@@ -30,6 +30,11 @@ public class DestinationAddress
 
     public DestinationAddress(NamedAddressSpace addressSpace, String routingAddress)
     {
+        this(addressSpace, routingAddress, false);
+    }
+
+    public DestinationAddress(NamedAddressSpace addressSpace, String routingAddress, boolean mayCreate)
+    {
         MessageDestination destination = null;
         String routingKey = routingAddress;
         if (routingAddress != null && !routingAddress.trim().equals(""))
@@ -37,7 +42,7 @@ public class DestinationAddress
             String localRoutingAddress = addressSpace.getLocalAddress(routingAddress);
             if (!localRoutingAddress.contains("/"))
             {
-                destination = addressSpace.getAttainedMessageDestination(localRoutingAddress);
+                destination = addressSpace.getAttainedMessageDestination(localRoutingAddress, mayCreate);
                 if (destination != null)
                 {
                     routingKey = "";
@@ -46,7 +51,7 @@ public class DestinationAddress
             else if (!localRoutingAddress.startsWith("/"))
             {
                 String[] parts = localRoutingAddress.split("/", 2);
-                destination = addressSpace.getAttainedMessageDestination(parts[0]);
+                destination = addressSpace.getAttainedMessageDestination(parts[0], mayCreate);
                 if (destination instanceof Exchange)
                 {
                     routingKey = parts[1];
diff --git a/broker-core/src/main/java/org/apache/qpid/server/model/NamedAddressSpace.java b/broker-core/src/main/java/org/apache/qpid/server/model/NamedAddressSpace.java
index ba8542c9..2792a31 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/model/NamedAddressSpace.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/model/NamedAddressSpace.java
@@ -44,8 +44,6 @@ public interface NamedAddressSpace extends Named
 
     MessageSource getAttainedMessageSource(String name);
 
-    MessageDestination getAttainedMessageDestination(String name);
-
     MessageDestination getAttainedMessageDestination(String name, boolean mayCreate);
 
     boolean registerConnection(AMQPConnection<?> connection,
diff --git a/broker-core/src/main/java/org/apache/qpid/server/model/Queue.java b/broker-core/src/main/java/org/apache/qpid/server/model/Queue.java
index bf4b724..d9b7efa 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/model/Queue.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/model/Queue.java
@@ -106,17 +106,24 @@ public interface Queue<X extends Queue<X>> extends ConfiguredObject<X>,
                                                  + "\"image/tiff\":\".tiff\","
                                                  + "\"text/plain\":\".txt\"}";
 
-    String QUEUE_DEFAULT_EXCLUSIVITY_POLICY = "queue.defaultExclusivityPolicy";
+    String QUEUE_DEFAULT_ALTERNATE_BINDING = "queue.defaultAlternateBinding";
     @SuppressWarnings("unused")
-    @ManagedContextDefault( name = QUEUE_DEFAULT_EXCLUSIVITY_POLICY,
+    @ManagedContextDefault( name = QUEUE_DEFAULT_ALTERNATE_BINDING,
             description = "the ExclusivityPolicy to apply to queues where none is explicitly set")
-    String DEFAULT_EXCLUSIVITY = "NONE";
+    String DEFAULT_ALTERNATE_BINDING = "";
 
-    @ManagedAttribute(description = "Provides an alternate destination that will be used when the number of delivery "
+    @ManagedAttribute(defaultValue = "${queue.defaultAlternateBinding}", initialization = Initialization.materialize,
+                      description = "Provides an alternate destination that will be used when the number of delivery "
                                     + "attempts exceeds the maximumDeliveryAttempt configured on this queue.  Messages "
                                     + "are also routed to this destination if this queue is deleted.")
     AlternateBinding getAlternateBinding();
 
+    String QUEUE_DEFAULT_EXCLUSIVITY_POLICY = "queue.defaultExclusivityPolicy";
+    @SuppressWarnings("unused")
+    @ManagedContextDefault( name = QUEUE_DEFAULT_EXCLUSIVITY_POLICY,
+            description = "the ExclusivityPolicy to apply to queues where none is explicitly set")
+    String DEFAULT_EXCLUSIVITY = "NONE";
+
     @ManagedAttribute( defaultValue = "${queue.defaultExclusivityPolicy}")
     ExclusivityPolicy getExclusive();
 
diff --git a/broker-core/src/main/java/org/apache/qpid/server/queue/QueueEntryImpl.java b/broker-core/src/main/java/org/apache/qpid/server/queue/QueueEntryImpl.java
index 431bd7c..f960897 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/queue/QueueEntryImpl.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/queue/QueueEntryImpl.java
@@ -586,6 +586,10 @@ public abstract class QueueEntryImpl implements QueueEntry
 
         final Queue<?> currentQueue = getQueue();
         MessageDestination alternateBindingDestination = currentQueue.getAlternateBindingDestination();
+        if(alternateBindingDestination == null && currentQueue.getAlternateBinding() != null)
+        {
+            alternateBindingDestination = currentQueue.getAddressSpace().getAttainedMessageDestination(currentQueue.getAlternateBinding().getDestination(), true);
+        }
         boolean autocommit =  txn == null;
 
         if(autocommit)
diff --git a/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractNonConnectionAcceptingVirtualHost.java b/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractNonConnectionAcceptingVirtualHost.java
index cfadb6e..6d75ad1 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractNonConnectionAcceptingVirtualHost.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractNonConnectionAcceptingVirtualHost.java
@@ -213,12 +213,6 @@ public abstract class AbstractNonConnectionAcceptingVirtualHost<X extends Abstra
     }
 
     @Override
-    public MessageDestination getAttainedMessageDestination(final String name)
-    {
-        return null;
-    }
-
-    @Override
     public MessageDestination getAttainedMessageDestination(final String name, final boolean mayCreate)
     {
         return null;
diff --git a/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java b/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java
index 856a627..3ddd26a 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java
@@ -765,7 +765,7 @@ public abstract class AbstractVirtualHost<X extends AbstractVirtualHost<X>> exte
     public int publishMessage(@Param(name = "message") final ManageableMessage message)
     {
         final String address = message.getAddress();
-        MessageDestination destination = address == null ? getDefaultDestination() : getAttainedMessageDestination(address);
+        MessageDestination destination = address == null ? getDefaultDestination() : getAttainedMessageDestination(address, true);
         if(destination == null)
         {
             destination = getDefaultDestination();
@@ -1386,12 +1386,6 @@ public abstract class AbstractVirtualHost<X extends AbstractVirtualHost<X>> exte
     }
 
     @Override
-    public MessageDestination getAttainedMessageDestination(final String name)
-    {
-        return getAttainedMessageDestination(name, true);
-    }
-
-    @Override
     public MessageDestination getAttainedMessageDestination(final String name, final boolean mayCreate)
     {
         MessageDestination destination = _systemNodeDestinations.get(name);
diff --git a/broker-core/src/test/java/org/apache/qpid/server/security/auth/manager/KerberosAuthenticationManagerTest.java b/broker-core/src/test/java/org/apache/qpid/server/security/auth/manager/KerberosAuthenticationManagerTest.java
index 1232367..eea1eef 100644
--- a/broker-core/src/test/java/org/apache/qpid/server/security/auth/manager/KerberosAuthenticationManagerTest.java
+++ b/broker-core/src/test/java/org/apache/qpid/server/security/auth/manager/KerberosAuthenticationManagerTest.java
@@ -19,7 +19,6 @@
 
 package org.apache.qpid.server.security.auth.manager;
 
-import static org.apache.commons.codec.CharEncoding.UTF_8;
 import static org.apache.qpid.server.security.auth.manager.KerberosAuthenticationManager.GSSAPI_MECHANISM;
 import static org.hamcrest.Matchers.not;
 import static org.junit.Assert.assertEquals;
@@ -32,6 +31,7 @@ import static org.mockito.Mockito.when;
 import java.io.File;
 import java.net.URL;
 import java.net.URLDecoder;
+import java.nio.charset.StandardCharsets;
 import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
 import java.util.Base64;
@@ -101,7 +101,8 @@ public class KerberosAuthenticationManagerTest extends UnitTestBase
         final URL resource = KerberosAuthenticationManagerTest.class.getClassLoader().getResource(LOGIN_CONFIG);
         LOGGER.debug("JAAS config:" + resource);
         assertNotNull(resource);
-        SYSTEM_PROPERTY_SETTER.setSystemProperty("java.security.auth.login.config", URLDecoder.decode(resource.getPath(), UTF_8));
+        SYSTEM_PROPERTY_SETTER.setSystemProperty("java.security.auth.login.config", URLDecoder.decode(resource.getPath(),
+                                                                                                      StandardCharsets.UTF_8.name()));
         SYSTEM_PROPERTY_SETTER.setSystemProperty("javax.security.auth.useSubjectCredsOnly", "false");
     }
 
diff --git a/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/LegacyAccessControlAdapter.java b/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/LegacyAccessControlAdapter.java
index 0aab300..e89f5c0 100644
--- a/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/LegacyAccessControlAdapter.java
+++ b/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/LegacyAccessControlAdapter.java
@@ -22,7 +22,6 @@ package org.apache.qpid.server.security.access.config;
 
 import static org.apache.qpid.server.security.access.config.LegacyOperation.ACCESS_LOGS;
 import static org.apache.qpid.server.security.access.config.LegacyOperation.BIND;
-import static org.apache.qpid.server.security.access.config.LegacyOperation.CREATE;
 import static org.apache.qpid.server.security.access.config.LegacyOperation.INVOKE;
 import static org.apache.qpid.server.security.access.config.LegacyOperation.PUBLISH;
 import static org.apache.qpid.server.security.access.config.LegacyOperation.PURGE;
@@ -535,7 +534,7 @@ class LegacyAccessControlAdapter
         properties.put(ObjectProperties.Property.ROUTING_KEY, (String)arguments.get("bindingKey"));
         properties.put(ObjectProperties.Property.VIRTUALHOST_NAME, virtualhost.getName());
 
-        MessageDestination dest = virtualhost.getAttainedMessageDestination(destination);
+        MessageDestination dest = virtualhost.getAttainedMessageDestination(destination, false);
         if (dest != null)
         {
             // The temporary attribute (inherited from the binding's queue) seems to exist to allow the user to
diff --git a/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java b/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java
index 97fceb2..17ea7e5 100644
--- a/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java
+++ b/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java
@@ -900,7 +900,7 @@ public class ServerSessionDelegate extends MethodDelegate<ServerSession> impleme
             if(method.getPassive())
             {
 
-                Exchange<?> exchange = getExchange(session, exchangeName);
+                Exchange<?> exchange = getExchange(session, exchangeName, false);
 
                 if(exchange == null)
                 {
@@ -943,7 +943,7 @@ public class ServerSessionDelegate extends MethodDelegate<ServerSession> impleme
                 }
                 catch(ReservedExchangeNameException e)
                 {
-                    Exchange<?> existingExchange = getExchange(session, exchangeName);
+                    Exchange<?> existingExchange = getExchange(session, exchangeName, false);
                     if(existingExchange == null
                        || !existingExchange.getType().equals(method.getType())
                        || (method.hasAlternateExchange() && (existingExchange.getAlternateBinding() == null ||
@@ -1041,14 +1041,14 @@ public class ServerSessionDelegate extends MethodDelegate<ServerSession> impleme
         session.close(errorCode.getValue(), description);
     }
 
-    private Exchange<?> getExchange(ServerSession session, String exchangeName)
+    private Exchange<?> getExchange(ServerSession session, String exchangeName, boolean mayCreate)
     {
-        return getExchange(getAddressSpace(session),exchangeName);
+        return getExchange(getAddressSpace(session),exchangeName, mayCreate);
     }
 
-    private Exchange<?> getExchange(NamedAddressSpace addressSpace, String exchangeName)
+    private Exchange<?> getExchange(NamedAddressSpace addressSpace, String exchangeName, boolean mayCreate)
     {
-        MessageDestination destination = addressSpace.getAttainedMessageDestination(exchangeName);
+        MessageDestination destination = addressSpace.getAttainedMessageDestination(exchangeName, mayCreate);
         return destination instanceof Exchange ? (Exchange<?>) destination : null;
     }
 
@@ -1066,7 +1066,7 @@ public class ServerSessionDelegate extends MethodDelegate<ServerSession> impleme
         MessageDestination destination;
         if(xfr.hasDestination())
         {
-            destination = addressSpace.getAttainedMessageDestination(xfr.getDestination());
+            destination = xfr.getDestination().trim().isEmpty() ? null : addressSpace.getAttainedMessageDestination(xfr.getDestination(), true);
             if(destination == null)
             {
                 destination = addressSpace.getDefaultDestination();
@@ -1101,7 +1101,7 @@ public class ServerSessionDelegate extends MethodDelegate<ServerSession> impleme
                 && xfr.getHeader().getDeliveryProperties() != null
                 && xfr.getHeader().getDeliveryProperties().getExchange() != null)
         {
-            destination = addressSpace.getAttainedMessageDestination(xfr.getHeader().getDeliveryProperties().getExchange());
+            destination = addressSpace.getAttainedMessageDestination(xfr.getHeader().getDeliveryProperties().getExchange(), true);
         }
         else
         {
@@ -1140,7 +1140,7 @@ public class ServerSessionDelegate extends MethodDelegate<ServerSession> impleme
             return;
         }
 
-        Exchange<?> exchange = getExchange(session, method.getExchange());
+        Exchange<?> exchange = getExchange(session, method.getExchange(), false);
 
         if(exchange == null)
         {
@@ -1202,7 +1202,7 @@ public class ServerSessionDelegate extends MethodDelegate<ServerSession> impleme
         }
         else
         {
-            Exchange<?> exchange = getExchange(session, exchangeName);
+            Exchange<?> exchange = getExchange(session, exchangeName, true);
 
             if(exchange != null)
             {
@@ -1244,7 +1244,7 @@ public class ServerSessionDelegate extends MethodDelegate<ServerSession> impleme
                     method.setBindingKey(method.getQueue());
                 }
                 Queue<?> queue = getQueue(addressSpace, method.getQueue());
-                Exchange<?> exchange = getExchange(addressSpace, exchangeName);
+                Exchange<?> exchange = getExchange(addressSpace, exchangeName, false);
                 if(queue == null)
                 {
                     exception(session, method, ExecutionErrorCode.NOT_FOUND, "Queue: '" + method.getQueue() + "' not found");
@@ -1315,7 +1315,7 @@ public class ServerSessionDelegate extends MethodDelegate<ServerSession> impleme
         else
         {
             Queue<?> queue = getQueue(addressSpace, method.getQueue());
-            Exchange<?> exchange = getExchange(addressSpace, method.getExchange());
+            Exchange<?> exchange = getExchange(addressSpace, method.getExchange(), false);
             if(queue == null)
             {
                 exception(session, method, ExecutionErrorCode.NOT_FOUND, "Queue: '" + method.getQueue() + "' not found");
@@ -1354,7 +1354,7 @@ public class ServerSessionDelegate extends MethodDelegate<ServerSession> impleme
         if(!nameNullOrEmpty(method.getExchange()))
         {
             isDefaultExchange = false;
-            exchange = getExchange(addressSpace, method.getExchange());
+            exchange = getExchange(addressSpace, method.getExchange(), false);
 
             if(exchange == null)
             {
diff --git a/broker-plugins/amqp-0-10-protocol/src/test/java/org/apache/qpid/server/protocol/v0_10/PropertyConverter_Internal_to_v0_10Test.java b/broker-plugins/amqp-0-10-protocol/src/test/java/org/apache/qpid/server/protocol/v0_10/PropertyConverter_Internal_to_v0_10Test.java
index 3540fc7..4cf87db 100644
--- a/broker-plugins/amqp-0-10-protocol/src/test/java/org/apache/qpid/server/protocol/v0_10/PropertyConverter_Internal_to_v0_10Test.java
+++ b/broker-plugins/amqp-0-10-protocol/src/test/java/org/apache/qpid/server/protocol/v0_10/PropertyConverter_Internal_to_v0_10Test.java
@@ -29,8 +29,11 @@ import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 import static org.mockito.AdditionalAnswers.returnsFirstArg;
 import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
@@ -391,7 +394,7 @@ public class PropertyConverter_Internal_to_v0_10Test extends UnitTestBase
         final String replyTo = "myTestQueue";
         final Queue queue = mock(Queue.class);
         when(queue.getName()).thenReturn(replyTo);
-        when(_addressSpace.getAttainedMessageDestination(replyTo)).thenReturn(queue);
+        doReturn(queue).when(_addressSpace).getAttainedMessageDestination(eq(replyTo),anyBoolean());
         when(header.getReplyTo()).thenReturn(replyTo);
         InternalMessage originalMessage = createTestMessage(header);
 
@@ -410,7 +413,7 @@ public class PropertyConverter_Internal_to_v0_10Test extends UnitTestBase
         final String replyTo = "myTestExchange";
         final Exchange exchange = mock(Exchange.class);
         when(exchange.getName()).thenReturn(replyTo);
-        when(_addressSpace.getAttainedMessageDestination(replyTo)).thenReturn(exchange);
+        doReturn(exchange).when(_addressSpace).getAttainedMessageDestination(eq(replyTo),anyBoolean());
         when(header.getReplyTo()).thenReturn(replyTo);
         InternalMessage originalMessage = createTestMessage(header);
 
@@ -431,7 +434,7 @@ public class PropertyConverter_Internal_to_v0_10Test extends UnitTestBase
         final String replyTo = String.format("%s/%s", exchangeName, routingKey);
         final Exchange exchange = mock(Exchange.class);
         when(exchange.getName()).thenReturn(exchangeName);
-        when(_addressSpace.getAttainedMessageDestination(exchangeName)).thenReturn(exchange);
+        doReturn(exchange).when(_addressSpace).getAttainedMessageDestination(eq(exchangeName),anyBoolean());
         when(header.getReplyTo()).thenReturn(replyTo);
         InternalMessage originalMessage = createTestMessage(header);
 
@@ -472,7 +475,7 @@ public class PropertyConverter_Internal_to_v0_10Test extends UnitTestBase
 
         final Exchange<?> exchange = mock(Exchange.class);
         when(exchange.getName()).thenReturn(testExchange);
-        when(_addressSpace.getAttainedMessageDestination(testExchange)).thenReturn(exchange);
+        doReturn(exchange).when(_addressSpace).getAttainedMessageDestination(eq(testExchange), anyBoolean());
 
         final MessageTransferMessage convertedMessage = _messageConverter.convert(message, _addressSpace);
 
@@ -491,7 +494,7 @@ public class PropertyConverter_Internal_to_v0_10Test extends UnitTestBase
 
         final Exchange<?> exchange = mock(Exchange.class);
         when(exchange.getName()).thenReturn(testExchange);
-        when(_addressSpace.getAttainedMessageDestination(testExchange)).thenReturn(exchange);
+        doReturn(exchange).when(_addressSpace).getAttainedMessageDestination(eq(testExchange), anyBoolean());
 
         final MessageTransferMessage convertedMessage = _messageConverter.convert(message, _addressSpace);
 
@@ -510,7 +513,7 @@ public class PropertyConverter_Internal_to_v0_10Test extends UnitTestBase
 
         final Queue<?> queue = mock(Queue.class);
         when(queue.getName()).thenReturn(testQueue);
-        when(_addressSpace.getAttainedMessageDestination(testQueue)).thenReturn(queue);
+        doReturn(queue).when(_addressSpace).getAttainedMessageDestination(eq(testQueue), anyBoolean());
 
         final MessageTransferMessage convertedMessage = _messageConverter.convert(message, _addressSpace);
 
@@ -531,7 +534,7 @@ public class PropertyConverter_Internal_to_v0_10Test extends UnitTestBase
 
         final Queue<?> queue = mock(Queue.class);
         when(queue.getName()).thenReturn(queueName);
-        when(_addressSpace.getAttainedMessageDestination(queueName)).thenReturn(queue);
+        doReturn(queue).when(_addressSpace).getAttainedMessageDestination(eq(queueName), anyBoolean());
 
         final MessageTransferMessage convertedMessage = _messageConverter.convert(message, _addressSpace);
 
@@ -553,7 +556,7 @@ public class PropertyConverter_Internal_to_v0_10Test extends UnitTestBase
         final Queue<?> queue = mock(Queue.class);
         when(queue.getName()).thenReturn(queueName);
         when(_addressSpace.getLocalAddress(globalAddress)).thenReturn(queueName);
-        when(_addressSpace.getAttainedMessageDestination(queueName)).thenReturn(queue);
+        doReturn(queue).when(_addressSpace).getAttainedMessageDestination(eq(queueName), anyBoolean());
         final MessageTransferMessage convertedMessage = _messageConverter.convert(message, _addressSpace);
 
         final DeliveryProperties deliveryProperties =
diff --git a/broker-plugins/amqp-0-10-protocol/src/test/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegateTest.java b/broker-plugins/amqp-0-10-protocol/src/test/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegateTest.java
index 314d180..58745b9 100644
--- a/broker-plugins/amqp-0-10-protocol/src/test/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegateTest.java
+++ b/broker-plugins/amqp-0-10-protocol/src/test/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegateTest.java
@@ -20,7 +20,9 @@
  */
 package org.apache.qpid.server.protocol.v0_10;
 
+import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.ArgumentMatchers.argThat;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
@@ -64,7 +66,7 @@ public class ServerSessionDelegateTest extends UnitTestBase
         Exchange<?> exchange = mock(Exchange.class);
         when(exchange.hasBindings()).thenReturn(true);
 
-        doReturn(exchange).when(_host).getAttainedMessageDestination(getTestName());
+        doReturn(exchange).when(_host).getAttainedMessageDestination(eq(getTestName()), anyBoolean());
 
         final ExchangeDelete method = new ExchangeDelete(getTestName(), Option.IF_UNUSED);
         _delegate.exchangeDelete(_session, method);
@@ -81,7 +83,7 @@ public class ServerSessionDelegateTest extends UnitTestBase
         Exchange<?> exchange = mock(Exchange.class);
         when(exchange.hasBindings()).thenReturn(false);
 
-        doReturn(exchange).when(_host).getAttainedMessageDestination(getTestName());
+        doReturn(exchange).when(_host).getAttainedMessageDestination(eq(getTestName()), anyBoolean());
 
         final ExchangeDelete method = new ExchangeDelete(getTestName(), Option.IF_UNUSED);
         _delegate.exchangeDelete(_session, method);
diff --git a/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java b/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java
index 4c4ebd2..c341740 100644
--- a/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java
+++ b/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java
@@ -1987,7 +1987,7 @@ public class AMQChannel extends AbstractAMQPSession<AMQChannel, ConsumerTarget_0
             }
             else
             {
-                destination = vHost.getAttainedMessageDestination(exchangeName.toString());
+                destination = vHost.getAttainedMessageDestination(exchangeName.toString(), true);
             }
 
             // if the exchange does not exist we raise a channel exception
@@ -2420,14 +2420,14 @@ public class AMQChannel extends AbstractAMQPSession<AMQChannel, ConsumerTarget_0
             {
                 if (queueName == null)
                 {
-                    replyCode = virtualHost.getAttainedMessageDestination(routingKey.toString()) instanceof Queue
+                    replyCode = virtualHost.getAttainedMessageDestination(routingKey.toString(), false) instanceof Queue
                             ? ExchangeBoundOkBody.OK
                             : ExchangeBoundOkBody.NO_QUEUE_BOUND_WITH_RK;
                     replyText = null;
                 }
                 else
                 {
-                    MessageDestination destination = virtualHost.getAttainedMessageDestination(queueName.toString());
+                    MessageDestination destination = virtualHost.getAttainedMessageDestination(queueName.toString(), false);
                     Queue<?> queue = destination instanceof Queue ? (Queue) destination : null;
                     if (queue == null)
                     {
@@ -2447,15 +2447,16 @@ public class AMQChannel extends AbstractAMQPSession<AMQChannel, ConsumerTarget_0
         }
         else
         {
-            Exchange<?> exchange = getExchange(exchangeName.toString());
-            if (exchange == null)
+            MessageDestination destination =
+                    getAddressSpace().getAttainedMessageDestination(exchangeName.toString(), true);
+            if (!(destination instanceof Exchange))
             {
-
                 replyCode = ExchangeBoundOkBody.EXCHANGE_NOT_FOUND;
                 replyText = "Exchange '" + exchangeName + "' not found";
             }
             else if (routingKey == null)
             {
+                Exchange<?> exchange = (Exchange<?>) destination;
                 if (queueName == null)
                 {
                     if (exchange.hasBindings())
@@ -2498,6 +2499,7 @@ public class AMQChannel extends AbstractAMQPSession<AMQChannel, ConsumerTarget_0
             }
             else if (queueName != null)
             {
+                Exchange<?> exchange = (Exchange<?>) destination;
                 Queue<?> queue = getQueue(queueName.toString());
                 if (queue == null)
                 {
@@ -2524,6 +2526,7 @@ public class AMQChannel extends AbstractAMQPSession<AMQChannel, ConsumerTarget_0
             }
             else
             {
+                Exchange<?> exchange = (Exchange<?>) destination;
                 if (exchange.isBound(routingKey == null ? "" : routingKey.toString()))
                 {
 
@@ -3549,7 +3552,7 @@ public class AMQChannel extends AbstractAMQPSession<AMQChannel, ConsumerTarget_0
 
     private Exchange<?> getExchange(String name)
     {
-        MessageDestination destination = getAddressSpace().getAttainedMessageDestination(name);
+        MessageDestination destination = getAddressSpace().getAttainedMessageDestination(name, false);
         return destination instanceof Exchange ? (Exchange<?>) destination : null;
     }
 
diff --git a/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/AMQChannelTest.java b/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/AMQChannelTest.java
index 37678da..0ed1cf5 100644
--- a/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/AMQChannelTest.java
+++ b/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/AMQChannelTest.java
@@ -21,6 +21,7 @@
 package org.apache.qpid.server.protocol.v0_8;
 
 import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.doAnswer;
@@ -142,7 +143,7 @@ public class AMQChannelTest extends UnitTestBase
         String testExchangeName = getTestName();
         Exchange<?> exchange = mock(Exchange.class);
         when(exchange.hasBindings()).thenReturn(true);
-        doReturn(exchange).when(_virtualHost).getAttainedMessageDestination(testExchangeName);
+        doReturn(exchange).when(_virtualHost).getAttainedMessageDestination(eq(testExchangeName), anyBoolean());
 
         AMQChannel channel = new AMQChannel(_amqConnection, 1, _messageStore);
 
@@ -158,7 +159,7 @@ public class AMQChannelTest extends UnitTestBase
     {
         Exchange<?> exchange = mock(Exchange.class);
         when(exchange.hasBindings()).thenReturn(false);
-        doReturn(exchange).when(_virtualHost).getAttainedMessageDestination(getTestName());
+        doReturn(exchange).when(_virtualHost).getAttainedMessageDestination(eq(getTestName()), anyBoolean());
 
         AMQChannel channel = new AMQChannel(_amqConnection, 1, _messageStore);
         channel.receiveExchangeDelete(AMQShortString.valueOf(getTestName()), true, false);
diff --git a/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/PropertyConverter_Internal_to_v0_8Test.java b/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/PropertyConverter_Internal_to_v0_8Test.java
index 9adb968..6d3365e 100644
--- a/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/PropertyConverter_Internal_to_v0_8Test.java
+++ b/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/PropertyConverter_Internal_to_v0_8Test.java
@@ -28,8 +28,11 @@ import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 import static org.mockito.AdditionalAnswers.returnsFirstArg;
 import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
@@ -313,7 +316,7 @@ public class PropertyConverter_Internal_to_v0_8Test extends UnitTestBase
         when(header.getReplyTo()).thenReturn(replyTo);
         Queue queue = mock(Queue.class);
         when(queue.getName()).thenReturn(replyTo);
-        when(_addressSpace.getAttainedMessageDestination(replyTo)).thenReturn(queue);
+        doReturn(queue).when(_addressSpace).getAttainedMessageDestination(eq(replyTo), anyBoolean());
 
         InternalMessage originalMessage = createTestMessage(header);
 
@@ -334,7 +337,7 @@ public class PropertyConverter_Internal_to_v0_8Test extends UnitTestBase
         when(exchange.getName()).thenReturn(replyTo);
         when(exchange.getType()).thenReturn(ExchangeDefaults.FANOUT_EXCHANGE_CLASS);
 
-        when(_addressSpace.getAttainedMessageDestination(replyTo)).thenReturn(exchange);
+        doReturn(exchange).when(_addressSpace).getAttainedMessageDestination(eq(replyTo), anyBoolean());
 
         InternalMessage originalMessage = createTestMessage(header);
 
@@ -357,7 +360,7 @@ public class PropertyConverter_Internal_to_v0_8Test extends UnitTestBase
         when(exchange.getName()).thenReturn(exchangeName);
         when(exchange.getType()).thenReturn(ExchangeDefaults.TOPIC_EXCHANGE_CLASS);
 
-        when(_addressSpace.getAttainedMessageDestination(exchangeName)).thenReturn(exchange);
+        doReturn(exchange).when(_addressSpace).getAttainedMessageDestination(eq(exchangeName), anyBoolean());
 
         InternalMessage originalMessage = createTestMessage(header);
 
@@ -398,7 +401,7 @@ public class PropertyConverter_Internal_to_v0_8Test extends UnitTestBase
 
         Exchange<?> exchange = mock(Exchange.class);
         when(exchange.getName()).thenReturn(testExchange);
-        when(_addressSpace.getAttainedMessageDestination(testExchange)).thenReturn(exchange);
+        doReturn(exchange).when(_addressSpace).getAttainedMessageDestination(eq(testExchange), anyBoolean());
 
         final AMQMessage convertedMessage = _messageConverter.convert(message, _addressSpace);
 
@@ -416,7 +419,7 @@ public class PropertyConverter_Internal_to_v0_8Test extends UnitTestBase
 
         final Exchange exchange = mock(Exchange.class);
         when(exchange.getName()).thenReturn(testExchange);
-        when(_addressSpace.getAttainedMessageDestination(testExchange)).thenReturn(exchange);
+        doReturn(exchange).when(_addressSpace).getAttainedMessageDestination(eq(testExchange), anyBoolean());
 
         final AMQMessage convertedMessage = _messageConverter.convert(message, _addressSpace);
 
@@ -438,7 +441,7 @@ public class PropertyConverter_Internal_to_v0_8Test extends UnitTestBase
 
         final Exchange exchange = mock(Exchange.class);
         when(exchange.getName()).thenReturn(testExchange);
-        when(_addressSpace.getAttainedMessageDestination(testExchange)).thenReturn(exchange);
+        doReturn(exchange).when(_addressSpace).getAttainedMessageDestination(eq(testExchange), anyBoolean());
 
         final AMQMessage convertedMessage = _messageConverter.convert(message, _addressSpace);
 
@@ -456,7 +459,7 @@ public class PropertyConverter_Internal_to_v0_8Test extends UnitTestBase
 
         final Queue queue = mock(Queue.class);
         when(queue.getName()).thenReturn(testQueue);
-        when(_addressSpace.getAttainedMessageDestination(testQueue)).thenReturn(queue);
+        doReturn(queue).when(_addressSpace).getAttainedMessageDestination(eq(testQueue), anyBoolean());
 
         final AMQMessage convertedMessage = _messageConverter.convert(message, _addressSpace);
 
@@ -477,7 +480,7 @@ public class PropertyConverter_Internal_to_v0_8Test extends UnitTestBase
 
         Queue<?> queue = mock(Queue.class);
         when(queue.getName()).thenReturn(queueName);
-        when(_addressSpace.getAttainedMessageDestination(queueName)).thenReturn(queue);
+        doReturn(queue).when(_addressSpace).getAttainedMessageDestination(eq(queueName), anyBoolean());
 
         final AMQMessage convertedMessage = _messageConverter.convert(message, _addressSpace);
 
@@ -498,7 +501,7 @@ public class PropertyConverter_Internal_to_v0_8Test extends UnitTestBase
 
         Queue<?> queue = mock(Queue.class);
         when(queue.getName()).thenReturn(queueName);
-        when(_addressSpace.getAttainedMessageDestination(queueName)).thenReturn(queue);
+        doReturn(queue).when(_addressSpace).getAttainedMessageDestination(eq(queueName), anyBoolean());
         when(_addressSpace.getLocalAddress(globalAddress)).thenReturn(queueName);
 
         final AMQMessage convertedMessage = _messageConverter.convert(message, _addressSpace);
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/AnonymousRelayDestination.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/AnonymousRelayDestination.java
index 00c0588..fb50ef0 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/AnonymousRelayDestination.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/AnonymousRelayDestination.java
@@ -66,7 +66,7 @@ public class AnonymousRelayDestination implements ReceivingDestination
     {
         final ReceivingDestination destination;
         final String routingAddress = message.getTo();
-        DestinationAddress destinationAddress = new DestinationAddress(_addressSpace, routingAddress);
+        DestinationAddress destinationAddress = new DestinationAddress(_addressSpace, routingAddress, true);
         MessageDestination messageDestination = destinationAddress.getMessageDestination();
         if (messageDestination != null)
         {
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Session_1_0.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Session_1_0.java
index 1300b4d..d003e3a 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Session_1_0.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Session_1_0.java
@@ -679,7 +679,7 @@ public class Session_1_0 extends AbstractAMQPSession<Session_1_0, ConsumerTarget
             }
             else
             {
-                DestinationAddress destinationAddress = new DestinationAddress(getAddressSpace(), addr);
+                DestinationAddress destinationAddress = new DestinationAddress(getAddressSpace(), addr, true);
                 MessageDestination messageDestination = destinationAddress.getMessageDestination();
 
                 if (messageDestination != null)
@@ -1314,7 +1314,7 @@ public class Session_1_0 extends AbstractAMQPSession<Session_1_0, ConsumerTarget
 
     private Exchange<?> getExchange(String name)
     {
-        MessageDestination destination = getAddressSpace().getAttainedMessageDestination(name);
+        MessageDestination destination = getAddressSpace().getAttainedMessageDestination(name, false);
         return destination instanceof Exchange ? (Exchange<?>) destination : null;
     }
 
diff --git a/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/test/java/org/apache/qpid/server/protocol/converter/v0_10_v1_0/PropertyConverter_1_0_to_0_10Test.java b/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/test/java/org/apache/qpid/server/protocol/converter/v0_10_v1_0/PropertyConverter_1_0_to_0_10Test.java
index cfe2bba..d2285aa3 100644
--- a/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/test/java/org/apache/qpid/server/protocol/converter/v0_10_v1_0/PropertyConverter_1_0_to_0_10Test.java
+++ b/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/test/java/org/apache/qpid/server/protocol/converter/v0_10_v1_0/PropertyConverter_1_0_to_0_10Test.java
@@ -25,7 +25,10 @@ import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 import static org.mockito.AdditionalAnswers.returnsFirstArg;
+import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
@@ -392,7 +395,7 @@ public class PropertyConverter_1_0_to_0_10Test extends UnitTestBase
         final String replyTo = "myTestQueue";
         final Queue queue = mock(Queue.class);
         when(queue.getName()).thenReturn(replyTo);
-        when(_namedAddressSpace.getAttainedMessageDestination(replyTo)).thenReturn(queue);
+        doReturn(queue).when(_namedAddressSpace).getAttainedMessageDestination(eq(replyTo), anyBoolean());
 
         Properties properties = new Properties();
         properties.setReplyTo(replyTo);
@@ -412,7 +415,7 @@ public class PropertyConverter_1_0_to_0_10Test extends UnitTestBase
         final String replyTo = "myTestExchange";
         final Exchange exchange = mock(Exchange.class);
         when(exchange.getName()).thenReturn(replyTo);
-        when(_namedAddressSpace.getAttainedMessageDestination(replyTo)).thenReturn(exchange);
+        doReturn(exchange).when(_namedAddressSpace).getAttainedMessageDestination(eq(replyTo), anyBoolean());
 
         Properties properties = new Properties();
         properties.setReplyTo(replyTo);
@@ -434,7 +437,7 @@ public class PropertyConverter_1_0_to_0_10Test extends UnitTestBase
         final String replyTo = String.format("%s/%s", exchangeName, routingKey);
         final Exchange exchange = mock(Exchange.class);
         when(exchange.getName()).thenReturn(exchangeName);
-        when(_namedAddressSpace.getAttainedMessageDestination(exchangeName)).thenReturn(exchange);
+        doReturn(exchange).when(_namedAddressSpace).getAttainedMessageDestination(eq(exchangeName), anyBoolean());
 
         Properties properties = new Properties();
         properties.setReplyTo(replyTo);
@@ -458,7 +461,7 @@ public class PropertyConverter_1_0_to_0_10Test extends UnitTestBase
         when(_namedAddressSpace.getLocalAddress(replyTo)).thenReturn(exchangeName + "/" + routingKey);
         final Exchange exchange = mock(Exchange.class);
         when(exchange.getName()).thenReturn(exchangeName);
-        when(_namedAddressSpace.getAttainedMessageDestination(exchangeName)).thenReturn(exchange);
+        doReturn(exchange).when(_namedAddressSpace).getAttainedMessageDestination(eq(exchangeName), anyBoolean());
 
         Properties properties = new Properties();
         properties.setReplyTo(replyTo);
@@ -878,7 +881,7 @@ public class PropertyConverter_1_0_to_0_10Test extends UnitTestBase
 
         final Exchange<?> exchange = mock(Exchange.class);
         when(exchange.getName()).thenReturn(testExchange);
-        when(_namedAddressSpace.getAttainedMessageDestination(testExchange)).thenReturn(exchange);
+        doReturn(exchange).when(_namedAddressSpace).getAttainedMessageDestination(eq(testExchange), anyBoolean());
 
         final MessageTransferMessage convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
 
@@ -898,7 +901,7 @@ public class PropertyConverter_1_0_to_0_10Test extends UnitTestBase
 
         final Exchange<?> exchange = mock(Exchange.class);
         when(exchange.getName()).thenReturn(testExchange);
-        when(_namedAddressSpace.getAttainedMessageDestination(testExchange)).thenReturn(exchange);
+        doReturn(exchange).when(_namedAddressSpace).getAttainedMessageDestination(eq(testExchange), anyBoolean());
 
         final MessageTransferMessage convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
 
@@ -920,7 +923,7 @@ public class PropertyConverter_1_0_to_0_10Test extends UnitTestBase
 
         final Exchange<?> exchange = mock(Exchange.class);
         when(exchange.getName()).thenReturn(testExchange);
-        when(_namedAddressSpace.getAttainedMessageDestination(testExchange)).thenReturn(exchange);
+        doReturn(exchange).when(_namedAddressSpace).getAttainedMessageDestination(eq(testExchange), anyBoolean());
 
         final MessageTransferMessage convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
 
@@ -940,7 +943,7 @@ public class PropertyConverter_1_0_to_0_10Test extends UnitTestBase
 
         final Queue<?> queue = mock(Queue.class);
         when(queue.getName()).thenReturn(testQueue);
-        when(_namedAddressSpace.getAttainedMessageDestination(testQueue)).thenReturn(queue);
+        doReturn(queue).when(_namedAddressSpace).getAttainedMessageDestination(eq(testQueue), anyBoolean());
 
         final MessageTransferMessage convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
 
@@ -962,7 +965,7 @@ public class PropertyConverter_1_0_to_0_10Test extends UnitTestBase
 
         final Queue<?> queue = mock(Queue.class);
         when(queue.getName()).thenReturn(queueName);
-        when(_namedAddressSpace.getAttainedMessageDestination(queueName)).thenReturn(queue);
+        doReturn(queue).when(_namedAddressSpace).getAttainedMessageDestination(eq(queueName), anyBoolean());
 
         final MessageTransferMessage convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
 
@@ -985,7 +988,7 @@ public class PropertyConverter_1_0_to_0_10Test extends UnitTestBase
         final Queue<?> queue = mock(Queue.class);
         when(queue.getName()).thenReturn(queueName);
         when(_namedAddressSpace.getLocalAddress(globalAddress)).thenReturn(queueName);
-        when(_namedAddressSpace.getAttainedMessageDestination(queueName)).thenReturn(queue);
+        doReturn(queue).when(_namedAddressSpace).getAttainedMessageDestination(eq(queueName), anyBoolean());
         final MessageTransferMessage convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
 
         final DeliveryProperties deliveryProperties =
diff --git a/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v0_10/MessageConverter_0_10_to_0_8.java b/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v0_10/MessageConverter_0_10_to_0_8.java
index ab9afa6..d5b528b 100644
--- a/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v0_10/MessageConverter_0_10_to_0_8.java
+++ b/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v0_10/MessageConverter_0_10_to_0_8.java
@@ -143,7 +143,7 @@ public class MessageConverter_0_10_to_0_8 implements MessageConverter<MessageTra
 
                 if (!"".equals(exchangeName) || (routingKey != null && !"".equals(routingKey)))
                 {
-                    MessageDestination destination = addressSpace.getAttainedMessageDestination(exchangeName);
+                    MessageDestination destination = addressSpace.getAttainedMessageDestination(exchangeName, false);
                     Exchange<?> exchange = destination instanceof Exchange ? (Exchange<?>) destination : null;
 
                     String exchangeClass = exchange == null
diff --git a/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/test/java/org/apache/qpid/server/protocol/converter/v0_8_v1_0/PropertyConverter_1_0_to_0_8Test.java b/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/test/java/org/apache/qpid/server/protocol/converter/v0_8_v1_0/PropertyConverter_1_0_to_0_8Test.java
index 99a7015..57d9df0 100644
--- a/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/test/java/org/apache/qpid/server/protocol/converter/v0_8_v1_0/PropertyConverter_1_0_to_0_8Test.java
+++ b/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/test/java/org/apache/qpid/server/protocol/converter/v0_8_v1_0/PropertyConverter_1_0_to_0_8Test.java
@@ -25,7 +25,10 @@ import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 import static org.mockito.AdditionalAnswers.returnsFirstArg;
+import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
@@ -375,7 +378,7 @@ public class PropertyConverter_1_0_to_0_8Test extends UnitTestBase
         final String replyTo = "myTestQueue";
         final Queue queue = mock(Queue.class);
         when(queue.getName()).thenReturn(replyTo);
-        when(_namedAddressSpace.getAttainedMessageDestination(replyTo)).thenReturn(queue);
+        doReturn(queue).when(_namedAddressSpace).getAttainedMessageDestination(eq(replyTo), anyBoolean());
 
         Properties properties = new Properties();
         properties.setReplyTo(replyTo);
@@ -395,7 +398,7 @@ public class PropertyConverter_1_0_to_0_8Test extends UnitTestBase
         final Exchange exchange = mock(Exchange.class);
         when(exchange.getName()).thenReturn(replyTo);
         when(exchange.getType()).thenReturn(ExchangeDefaults.FANOUT_EXCHANGE_CLASS);
-        when(_namedAddressSpace.getAttainedMessageDestination(replyTo)).thenReturn(exchange);
+        doReturn(exchange).when(_namedAddressSpace).getAttainedMessageDestination(eq(replyTo), anyBoolean());
 
         Properties properties = new Properties();
         properties.setReplyTo(replyTo);
@@ -419,7 +422,7 @@ public class PropertyConverter_1_0_to_0_8Test extends UnitTestBase
         final Exchange exchange = mock(Exchange.class);
         when(exchange.getName()).thenReturn(exchangeName);
         when(exchange.getType()).thenReturn(ExchangeDefaults.TOPIC_EXCHANGE_CLASS);
-        when(_namedAddressSpace.getAttainedMessageDestination(exchangeName)).thenReturn(exchange);
+        doReturn(exchange).when(_namedAddressSpace).getAttainedMessageDestination(eq(exchangeName), anyBoolean());
 
         Properties properties = new Properties();
         properties.setReplyTo(replyTo);
@@ -445,7 +448,7 @@ public class PropertyConverter_1_0_to_0_8Test extends UnitTestBase
         final Exchange exchange = mock(Exchange.class);
         when(exchange.getName()).thenReturn(exchangeName);
         when(exchange.getType()).thenReturn(ExchangeDefaults.TOPIC_EXCHANGE_CLASS);
-        when(_namedAddressSpace.getAttainedMessageDestination(exchangeName)).thenReturn(exchange);
+        doReturn(exchange).when(_namedAddressSpace).getAttainedMessageDestination(eq(exchangeName), anyBoolean());
 
         Properties properties = new Properties();
         properties.setReplyTo(replyTo);
@@ -775,7 +778,7 @@ public class PropertyConverter_1_0_to_0_8Test extends UnitTestBase
 
         Exchange<?> exchange = mock(Exchange.class);
         when(exchange.getName()).thenReturn(testExchange);
-        when(_namedAddressSpace.getAttainedMessageDestination(testExchange)).thenReturn(exchange);
+        doReturn(exchange).when(_namedAddressSpace).getAttainedMessageDestination(eq(testExchange), anyBoolean());
 
         final AMQMessage convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
 
@@ -795,7 +798,7 @@ public class PropertyConverter_1_0_to_0_8Test extends UnitTestBase
 
         final Exchange exchange = mock(Exchange.class);
         when(exchange.getName()).thenReturn(testExchange);
-        when(_namedAddressSpace.getAttainedMessageDestination(testExchange)).thenReturn(exchange);
+        doReturn(exchange).when(_namedAddressSpace).getAttainedMessageDestination(eq(testExchange), anyBoolean());
 
         final AMQMessage convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
 
@@ -817,7 +820,7 @@ public class PropertyConverter_1_0_to_0_8Test extends UnitTestBase
 
         final Exchange exchange = mock(Exchange.class);
         when(exchange.getName()).thenReturn(testExchange);
-        when(_namedAddressSpace.getAttainedMessageDestination(testExchange)).thenReturn(exchange);
+        doReturn(exchange).when(_namedAddressSpace).getAttainedMessageDestination(eq(testExchange),anyBoolean());
 
         final AMQMessage convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
 
@@ -837,7 +840,7 @@ public class PropertyConverter_1_0_to_0_8Test extends UnitTestBase
 
         final Queue queue = mock(Queue.class);
         when(queue.getName()).thenReturn(testQueue);
-        when(_namedAddressSpace.getAttainedMessageDestination(testQueue)).thenReturn(queue);
+        doReturn(queue).when(_namedAddressSpace).getAttainedMessageDestination(eq(testQueue), anyBoolean());
 
         final AMQMessage convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
 
@@ -875,7 +878,7 @@ public class PropertyConverter_1_0_to_0_8Test extends UnitTestBase
 
         Queue<?> queue = mock(Queue.class);
         when(queue.getName()).thenReturn(queueName);
-        when(_namedAddressSpace.getAttainedMessageDestination(queueName)).thenReturn(queue);
+        doReturn(queue).when(_namedAddressSpace).getAttainedMessageDestination(eq(queueName), anyBoolean());
         when(_namedAddressSpace.getLocalAddress(globalAddress)).thenReturn(queueName);
 
         final AMQMessage convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
diff --git a/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementAddressSpace.java b/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementAddressSpace.java
index 379ec5e..88df857 100644
--- a/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementAddressSpace.java
+++ b/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementAddressSpace.java
@@ -154,7 +154,7 @@ public class ManagementAddressSpace implements NamedAddressSpace
     }
 
     @Override
-    public MessageDestination getAttainedMessageDestination(final String name)
+    public MessageDestination getAttainedMessageDestination(final String name, final boolean mayCreate)
     {
         if(_managementNode.getName().equals(name))
         {
@@ -169,12 +169,6 @@ public class ManagementAddressSpace implements NamedAddressSpace
         return null;
     }
 
-    @Override
-    public MessageDestination getAttainedMessageDestination(final String name, final boolean mayCreate)
-    {
-        return getAttainedMessageDestination(name);
-    }
-
     ProxyMessageSource getProxyNode(final String name)
     {
         LOGGER.debug("RG: looking for proxy source {}", name);
@@ -412,7 +406,7 @@ public class ManagementAddressSpace implements NamedAddressSpace
                                                                                                    final String routingAddress,
                                                                                                    final InstanceProperties instanceProperties)
         {
-            MessageDestination destination = getAttainedMessageDestination(routingAddress);
+            MessageDestination destination = getAttainedMessageDestination(routingAddress, false);
             if(destination == null || destination == this)
             {
                 return new RoutingResult<>(message);
diff --git a/doc/java-broker/src/docbkx/runtime/Java-Broker-Runtime-Handling-Undeliverable-Messages.xml b/doc/java-broker/src/docbkx/runtime/Java-Broker-Runtime-Handling-Undeliverable-Messages.xml
index 52c5f27..860bee1 100644
--- a/doc/java-broker/src/docbkx/runtime/Java-Broker-Runtime-Handling-Undeliverable-Messages.xml
+++ b/doc/java-broker/src/docbkx/runtime/Java-Broker-Runtime-Handling-Undeliverable-Messages.xml
@@ -51,7 +51,7 @@
    message via the queue's <emphasis>alternate binding</emphasis> (if one has been defined), or will
    discard the message.</para>
   <para>When using AMQP 1.0 the current delivery count of a message is available to the consuming
-   application via the<literal>message-count</literal> message header (exposed via the
+   application via the <literal>message-count</literal> message header (exposed via the
    <literal>JMSXDeliveryCount</literal> JMS message property when using JMS).  When using the
    AMQP 0-8..0-10 protocols this information is not available.</para>
   <note>
@@ -73,6 +73,25 @@
     specified, the Broker automatically routes the message via the alternate binding.  The alternate binding
     would normally specify a queue designated for that purpose of receiving the undeliverable messages.
     By convention such queues are known as dead-letter queues or simply DLQs.</para>
+  <para>It is possible to configure the broker to automatically default a DLQ for every queue created.  To do this
+    one can set the context variable <varname>queue.defaultAlternateBinding</varname> at the Virtual Host (or above)
+    level.  For example, by setting the value to <literal>{\"destination\": \"$${this:name}_DLQ\"}</literal>
+    a new queue <emphasis>exampleQueue</emphasis> will default to having an alternate binding to
+    <emphasis>exampleQueue_DLQ</emphasis>.  To avoid error this should be combined with setting a node auto creation
+    policy on the VirtualHost, so that such DLQs are automatically created, e.g. </para>
+  <screen>
+   "nodeAutoCreationPolicies" : [ {
+   "pattern" : ".*_DLQ",
+   "nodeType" : "Queue",
+   "attributes" : {
+   "alternateBinding" : ""
+   },
+   "createdOnPublish" : true,
+   "createdOnConsume" : true
+   } ]
+  </screen>
+  <note>For the autocreated DLQs it is important to override the default alternate binding, as above, else the creation of an
+    infinite chain of DLQs for DLQs will be attempted.</note>
   <caution>
    <title>Avoid excessive queue depth</title>
    <para>Applications making use of DLQs <emphasis>should</emphasis> make provision for the frequent


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org