mattrpav commented on code in PR #2136:
URL: https://github.com/apache/activemq/pull/2136#discussion_r3453603445


##########
activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/protocol/AmqpSender.java:
##########
@@ -491,7 +493,16 @@ public void pumpOutbound() throws Exception {
                     }
                 }
             } catch (Exception e) {
-                LOG.warn("Error detected while flushing outbound messages: 
{}", e.getMessage());
+                // Check if there is a format error trying to convert the 
message. This error means the
+                // message can't be converted (corruption, etc). This will 
wrap and throw the message
+                // so it can be handled by the transport
+                ActiveMQMessageFormatException formatError = 
ExceptionUtils.createMessageFormatException(e);
+                if (formatError != null) {
+                    LOG.warn("Message conversion error while flushing outbound 
messages: {}", e.getMessage(), e);
+                    throw e;

Review Comment:
   Do you mean to throw formatError here?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to