You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2020/03/21 19:44:58 UTC

[GitHub] [activemq-artemis] jbertram commented on a change in pull request #3017: ARTEMIS-2649 refactor ORIG message props

jbertram commented on a change in pull request #3017: ARTEMIS-2649 refactor ORIG message props
URL: https://github.com/apache/activemq-artemis/pull/3017#discussion_r396022958
 
 

 ##########
 File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
 ##########
 @@ -3418,7 +3419,12 @@ private boolean sendToDeadLetterAddress(final Transaction tx,
             ref.acknowledge(tx, AckReason.KILLED, null);
          } else {
             ActiveMQServerLogger.LOGGER.messageExceededMaxDeliverySendtoDLA(ref, deadLetterAddress, name);
-            move(tx, deadLetterAddress, null, ref, false, AckReason.KILLED, null);
+            RoutingStatus status = move(tx, deadLetterAddress, null, ref, false, AckReason.KILLED, null);
+
+            // this shouldn't happen, but in case it does it's better to log a message than just drop the message silently
+            if (status.equals(RoutingStatus.NO_BINDINGS) && server.getAddressSettingsRepository().getMatch(getAddress().toString()).isAutoCreateDeadLetterResources()) {
+               ActiveMQServerLogger.LOGGER.noMatchingBindingsOnDLAWithAutoCreateDLAResources(deadLetterAddress, ref.toString());
 
 Review comment:
   For what it's worth, there's precedence for this (which is why I implemented it this way). Messages are dropped with a warning in the case where `max-delivery-attempts` has been exceeded and there's no `dead-letter-address` configured or if there is a `dead-letter-address` configured but there are no queues bound to it. The same is true in the case where a message expires and there's no `expiry-address` configured or if there is a `expiry-address` configured but there are no queues bound to it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services