[ 
https://issues.apache.org/jira/browse/ARTEMIS-2937?focusedWorklogId=503401&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-503401
 ]

ASF GitHub Bot logged work on ARTEMIS-2937:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 21/Oct/20 21:01
            Start Date: 21/Oct/20 21:01
    Worklog Time Spent: 10m 
      Work Description: tabish121 commented on a change in pull request #3294:
URL: https://github.com/apache/activemq-artemis/pull/3294#discussion_r509693361



##########
File path: 
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java
##########
@@ -642,9 +657,17 @@ protected synchronized void scanMessageData() {
             } else if 
(DeliveryAnnotations.class.equals(constructor.getTypeClass())) {
                // Don't decode these as they are not used by the broker at all 
and are
                // discarded on send, mark for lazy decode if ever needed.
-               constructor.skipValue();
-               deliveryAnnotationsPosition = constructorPos;
-               encodedDeliveryAnnotationsSize = data.position() - 
constructorPos;
+               try {
+                  deliveryAnnotationsPosition = constructorPos;
+                  this.deliveryAnnotations = (DeliveryAnnotations) 
constructor.readValue();
+                  encodedDeliveryAnnotationsSize = data.position() - 
constructorPos;
+               } catch (Exception e) {
+                  // mal formed delivery annotation, we will just skip it then
+                  logger.debug(e.getMessage(), e);
+                  data.position(constructorPos);
+                  constructor.skipValue();
+                  encodedDeliveryAnnotationsSize = data.position() - 
constructorPos;
+               }

Review comment:
       This test was originally checking that since the broker didn't ever use 
any delivery annotations and simply trimmed them that it didn't bother to try 
and decode and validate them  Since you are actually using them in this new 
feature it probably means you can now remove this test and react accordingly to 
delivery annotations that have encoding issues vs just trimming them out. 




----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 503401)
    Time Spent: 15h  (was: 14h 50m)

> AMQP Server Connectivity
> ------------------------
>
>                 Key: ARTEMIS-2937
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2937
>             Project: ActiveMQ Artemis
>          Issue Type: New Feature
>          Components: AMQP
>            Reporter: Clebert Suconic
>            Assignee: Clebert Suconic
>            Priority: Major
>             Fix For: 2.16.0
>
>          Time Spent: 15h
>  Remaining Estimate: 0h
>
> This feature adds server side connectivity.
>  
> It is possible to link two brokers directly using AMQP with this feature, and 
> have a Queue transferring messages to another broker directly. 
>  
> For this we would have options called <sender and <receiver
>  
>  
> it would also be possible to use qpid-dispatch as an intermediary between 
> clients and the brokers (or eventually between brokers), on that case the 
> option will be <peer
>  
> it would also be possible to use <mirror with a few option to replicate data 
> between two brokers, bringing the possibility of using it for Disaster & 
> Recovery and Failover.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to