[jira] [Commented] (PROTON-694) splitting contrib/JMSMappingOutboundTransformer's encoding and transformation
[ https://issues.apache.org/jira/browse/PROTON-694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14166770#comment-14166770 ] ASF subversion and git services commented on PROTON-694: Commit 1630838 from [~gsim] in branch 'proton/branches/examples' [ https://svn.apache.org/r1630838 ] PROTON-694: split conversion and encoding during outbound transformation to allow calling separately Applied patch from Clebert Suconic > splitting contrib/JMSMappingOutboundTransformer's encoding and transformation > - > > Key: PROTON-694 > URL: https://issues.apache.org/jira/browse/PROTON-694 > Project: Qpid Proton > Issue Type: Bug >Reporter: clebert suconic > Fix For: 0.8 > > Attachments: diff.patch > > > I just need the transformation from this method, not the actual encoding. > I need to later encode the ProtonJMessage using NettyBuffer which is pooled > and more efficient than the method done within JMSMappingOutboundTransformer. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PROTON-694) splitting contrib/JMSMappingOutboundTransformer's encoding and transformation
[ https://issues.apache.org/jira/browse/PROTON-694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14143621#comment-14143621 ] ASF subversion and git services commented on PROTON-694: Commit 1626868 from [~gemmellr] in branch 'proton/trunk' [ https://svn.apache.org/r1626868 ] PROTON-694: split conversion and encoding during outbound transformation to allow calling separately Applied patch from Clebert Suconic > splitting contrib/JMSMappingOutboundTransformer's encoding and transformation > - > > Key: PROTON-694 > URL: https://issues.apache.org/jira/browse/PROTON-694 > Project: Qpid Proton > Issue Type: Bug >Reporter: clebert suconic > Attachments: diff.patch > > > I just need the transformation from this method, not the actual encoding. > I need to later encode the ProtonJMessage using NettyBuffer which is pooled > and more efficient than the method done within JMSMappingOutboundTransformer. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PROTON-694) splitting contrib/JMSMappingOutboundTransformer's encoding and transformation
[ https://issues.apache.org/jira/browse/PROTON-694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14143592#comment-14143592 ] Robbie Gemmell commented on PROTON-694: --- Patches output by git format-patch / git diff / etc are fine, or you can grab via from github by appending .patch to the commit URL as I did above. > splitting contrib/JMSMappingOutboundTransformer's encoding and transformation > - > > Key: PROTON-694 > URL: https://issues.apache.org/jira/browse/PROTON-694 > Project: Qpid Proton > Issue Type: Bug >Reporter: clebert suconic > Attachments: diff.patch > > > I just need the transformation from this method, not the actual encoding. > I need to later encode the ProtonJMessage using NettyBuffer which is pooled > and more efficient than the method done within JMSMappingOutboundTransformer. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PROTON-694) splitting contrib/JMSMappingOutboundTransformer's encoding and transformation
[ https://issues.apache.org/jira/browse/PROTON-694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14143589#comment-14143589 ] clebert suconic commented on PROTON-694: I have squashed the change at https://github.com/clebertsuconic/qpid-proton/commit/06fd5f50bc66b57cb207915579eb61e99ad5f272 and I also have attached the diff here > splitting contrib/JMSMappingOutboundTransformer's encoding and transformation > - > > Key: PROTON-694 > URL: https://issues.apache.org/jira/browse/PROTON-694 > Project: Qpid Proton > Issue Type: Bug >Reporter: clebert suconic > Attachments: diff.patch > > > I just need the transformation from this method, not the actual encoding. > I need to later encode the ProtonJMessage using NettyBuffer which is pooled > and more efficient than the method done within JMSMappingOutboundTransformer. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PROTON-694) splitting contrib/JMSMappingOutboundTransformer's encoding and transformation
[ https://issues.apache.org/jira/browse/PROTON-694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14143584#comment-14143584 ] clebert suconic commented on PROTON-694: Oh.. I see now... I did some cleanup on the format and screwed up the patch... Let me fix here... how do you want the patch here? > splitting contrib/JMSMappingOutboundTransformer's encoding and transformation > - > > Key: PROTON-694 > URL: https://issues.apache.org/jira/browse/PROTON-694 > Project: Qpid Proton > Issue Type: Bug >Reporter: clebert suconic > > I just need the transformation from this method, not the actual encoding. > I need to later encode the ProtonJMessage using NettyBuffer which is pooled > and more efficient than the method done within JMSMappingOutboundTransformer. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PROTON-694) splitting contrib/JMSMappingOutboundTransformer's encoding and transformation
[ https://issues.apache.org/jira/browse/PROTON-694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14143573#comment-14143573 ] Robbie Gemmell commented on PROTON-694: --- Looking at the applied patch now, I see it adds a new method, convert(..) which splits out most of the previous transform(..) implementation and is then called from the still-remaining transform(..) method. The last things convert(..) does after applying the patch is create a ProtonJ message, encode it to a buffer, then create a second ProtonJ message and then return it. When called from transform(..) the returned message is then encoded to another buffer which gets returned via an EncodedMessage as previously. Surely the first encode there isnt needed? > splitting contrib/JMSMappingOutboundTransformer's encoding and transformation > - > > Key: PROTON-694 > URL: https://issues.apache.org/jira/browse/PROTON-694 > Project: Qpid Proton > Issue Type: Bug >Reporter: clebert suconic > > I just need the transformation from this method, not the actual encoding. > I need to later encode the ProtonJMessage using NettyBuffer which is pooled > and more efficient than the method done within JMSMappingOutboundTransformer. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PROTON-694) splitting contrib/JMSMappingOutboundTransformer's encoding and transformation
[ https://issues.apache.org/jira/browse/PROTON-694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14143508#comment-14143508 ] clebert suconic commented on PROTON-694: The previous version would do this: ProtonJMessage amqp = (ProtonJMessage) org.apache.qpid.proton.message.Message.Factory.create(header, da, ma, props, ap, body, footer); ByteBuffer buffer = ByteBuffer.wrap(new byte[1024*4]); final DroppingWritableBuffer overflow = new DroppingWritableBuffer(); int c = amqp.encode(new CompositeWritableBuffer(new WritableBuffer.ByteBufferWrapper(buffer), overflow)); if( overflow.position() > 0 ) { buffer = ByteBuffer.wrap(new byte[1024*4+overflow.position()]); c = amqp.encode(new WritableBuffer.ByteBufferWrapper(buffer)); } return new EncodedMessage(messageFormat, buffer.array(), 0, c); after my patch I'm doing the conversion on a sub method and then doing this existent conversion at the caller method. I intend to call the version that won't be doing this final conversion. > splitting contrib/JMSMappingOutboundTransformer's encoding and transformation > - > > Key: PROTON-694 > URL: https://issues.apache.org/jira/browse/PROTON-694 > Project: Qpid Proton > Issue Type: Bug >Reporter: clebert suconic > > I just need the transformation from this method, not the actual encoding. > I need to later encode the ProtonJMessage using NettyBuffer which is pooled > and more efficient than the method done within JMSMappingOutboundTransformer. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PROTON-694) splitting contrib/JMSMappingOutboundTransformer's encoding and transformation
[ https://issues.apache.org/jira/browse/PROTON-694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14143502#comment-14143502 ] clebert suconic commented on PROTON-694: I don't think it's double encoding... the previous version was already creating a ProtonJMessage and then generating the EncodedMessage. this is exactly splitting the previous behaviour. > splitting contrib/JMSMappingOutboundTransformer's encoding and transformation > - > > Key: PROTON-694 > URL: https://issues.apache.org/jira/browse/PROTON-694 > Project: Qpid Proton > Issue Type: Bug >Reporter: clebert suconic > > I just need the transformation from this method, not the actual encoding. > I need to later encode the ProtonJMessage using NettyBuffer which is pooled > and more efficient than the method done within JMSMappingOutboundTransformer. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PROTON-694) splitting contrib/JMSMappingOutboundTransformer's encoding and transformation
[ https://issues.apache.org/jira/browse/PROTON-694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14143409#comment-14143409 ] Robbie Gemmell commented on PROTON-694: --- Downloaded change from https://github.com/clebertsuconic/qpid-proton/commit/0626fc4da878c8b8f8e7960a17b6ad70ec999028.patch to examine. {noformat} @@ -223,7 +226,8 @@ static EncodedMessage transform(JMSMappingOutboundTransformer options, Message m c = amqp.encode(new WritableBuffer.ByteBufferWrapper(buffer)); } -return new EncodedMessage(messageFormat, buffer.array(), 0, c); +return (ProtonJMessage) org.apache.qpid.proton.message.Message.Factory +.create(header, da, ma, props, ap, body, footer); } private static String destinationAttributes(Destination destination) { {noformat} In the above snippet he patch returns a new ProtonJ message from the new convert method insead of the previous EncodedMessage returned, and then elsewhere adds a new encoding step using that ProtonJ message...but doesnt remove any existing encoding. This combined with the above context containing another encode call suggests it is now double-encoding, is that intended? If the change needs updated, please attach the patch here instead of linking to a branch. > splitting contrib/JMSMappingOutboundTransformer's encoding and transformation > - > > Key: PROTON-694 > URL: https://issues.apache.org/jira/browse/PROTON-694 > Project: Qpid Proton > Issue Type: Bug >Reporter: clebert suconic > > I just need the transformation from this method, not the actual encoding. > I need to later encode the ProtonJMessage using NettyBuffer which is pooled > and more efficient than the method done within JMSMappingOutboundTransformer. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PROTON-694) splitting contrib/JMSMappingOutboundTransformer's encoding and transformation
[ https://issues.apache.org/jira/browse/PROTON-694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14143282#comment-14143282 ] Hiram Chirino commented on PROTON-694: -- Seems ok to me. > splitting contrib/JMSMappingOutboundTransformer's encoding and transformation > - > > Key: PROTON-694 > URL: https://issues.apache.org/jira/browse/PROTON-694 > Project: Qpid Proton > Issue Type: Bug >Reporter: clebert suconic > > I just need the transformation from this method, not the actual encoding. > I need to later encode the ProtonJMessage using NettyBuffer which is pooled > and more efficient than the method done within JMSMappingOutboundTransformer. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PROTON-694) splitting contrib/JMSMappingOutboundTransformer's encoding and transformation
[ https://issues.apache.org/jira/browse/PROTON-694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14143239#comment-14143239 ] clebert suconic commented on PROTON-694: this is the patch: https://github.com/clebertsuconic/qpid-proton/tree/PROTON-694 > splitting contrib/JMSMappingOutboundTransformer's encoding and transformation > - > > Key: PROTON-694 > URL: https://issues.apache.org/jira/browse/PROTON-694 > Project: Qpid Proton > Issue Type: Bug >Reporter: clebert suconic > > I just need the transformation from this method, not the actual encoding. > I need to later encode the ProtonJMessage using NettyBuffer which is pooled > and more efficient than the method done within JMSMappingOutboundTransformer. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PROTON-694) splitting contrib/JMSMappingOutboundTransformer's encoding and transformation
[ https://issues.apache.org/jira/browse/PROTON-694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14143232#comment-14143232 ] clebert suconic commented on PROTON-694: I don't need an interface method here as I'm only using this transformer within the context of JMS. I will attach a patch shortly > splitting contrib/JMSMappingOutboundTransformer's encoding and transformation > - > > Key: PROTON-694 > URL: https://issues.apache.org/jira/browse/PROTON-694 > Project: Qpid Proton > Issue Type: Bug >Reporter: clebert suconic > > I just need the transformation from this method, not the actual encoding. > I need to later encode the ProtonJMessage using NettyBuffer which is pooled > and more efficient than the method done within JMSMappingOutboundTransformer. -- This message was sent by Atlassian JIRA (v6.3.4#6332)