You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/04/23 15:17:00 UTC

[jira] [Work logged] (ARTEMIS-2316) AMQPMessage missing ApplicationProperties from custom transformer

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

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

                Author: ASF GitHub Bot
            Created on: 23/Apr/19 15:16
            Start Date: 23/Apr/19 15:16
    Worklog Time Spent: 10m 
      Work Description: ldebello commented on pull request #2634: ARTEMIS-2316 AMQPMessage missing ApplicationProperties from custom transformer
URL: https://github.com/apache/activemq-artemis/pull/2634
 
 
   This PR is to solve the issue https://issues.apache.org/jira/browse/ARTEMIS-2316
 
----------------------------------------------------------------
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


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

            Worklog Id:     (was: 231446)
            Time Spent: 10m
    Remaining Estimate: 0h

> AMQPMessage missing ApplicationProperties from custom transformer
> -----------------------------------------------------------------
>
>                 Key: ARTEMIS-2316
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2316
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>            Reporter: Luis Miguel De Bello
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> We are working with Artemis 2.6.3 and we are trying to move to 2.7.0 after doing a quick test we found an issue introduced in 2.6.4.
> If you have a custom transformer and include properties in a AMQPMessage in some scenarios they are lost because the reencode is not executed, this was change in the following commit
> [https://github.com/apache/activemq-artemis/commit/e065e3e960ac8cc6505a71ec4f67b58b4ffb5990#diff-4a5cefc3ba360bce9985ad42fc0c2231R698]
>  
> As the flag is bufferValid is marked as true the "encodeProtonMessage();" is not execute because there is a check before executing it. I understand this was include for performance reason because the message was encoded multiples times.
>  
> I have created a test were you can see the error and I made some changes to fix this. The idea is call the reencode method which is implemented only for AMQPMessage after doing a transform because the user can do whatever they want in the transform.
> Scenario:
> Broker 1
> Broker 2
>  
> Broker 1 Address *.Provider.*.Agent.*.CustomNotification
> Broker 1 FrameworkNotifications
> Broker 2 BridgeNotifications
> Broker 2 Notifications
>  
> Broker 1 Diverts from Address *.Provider.*.Agent.*.CustomNotification to FrameworkNotifications
> It applies a custom transformer which include two properties ("A", "B")
> Broker 1 has a bridge to Broker 2 to BridgeNotifications
> It applies a custom transformer which include two properties ("C", "D")
> Broker 2 Diverts from BridgeNotifications to Notifications
>  
> Produce AMQPMessage to Broker 1 to Address *.Provider.*.Agent.*.CustomNotification
> Consume Message from Broker in Notifications
>  
> Result: The message consume does not have these 4 properties.
>  
> Note: At the beginning I thought I could remove the brigde to reproduce the issue and only produce and consume only one broker which some custom transformer, but this case works as expected because the message is in memory and have the properties. Although I think (I didnt validate this) the same could happen in the same broker if you have pagination to disk and the message got persisted.
> That  is the reason why I have added the reencode after divert transformer and bridge transformer.
>  
> I will send a PR with this to get some discussion about this.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)