gaohoward commented on code in PR #5091:
URL: https://github.com/apache/activemq-artemis/pull/5091#discussion_r1689998704


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java:
##########
@@ -1284,6 +1284,15 @@ public void addTail(final MessageReference ref, final 
boolean direct) {
          if (scheduleIfPossible(ref)) {
             return;
          }
+         if (checkInvalid(ref)) {
+            //send to dlq
+            try {
+               sendToDeadLetterAddress(null, ref);

Review Comment:
   I think that's the simple way to go. The message should be checked before it 
goes into queue. By the time it goes to deliver process, it's too late I think. 
   But adding a header perhaps to tell the reason makes sense to me.



-- 
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.

To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org
For additional commands, e-mail: gitbox-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact


Reply via email to