cshannon commented on PR #1851: URL: https://github.com/apache/activemq/pull/1851#issuecomment-4169811718
@arnoudja - The order of the two calls doesn't matter at all as they do different things. The onSend() call marks the messages as read only and prepares bytes messages (for example) by closing the output stream and storing in the right format. The beforeMarshal() is used for handling any conversion work needed to send over the wire that might not be done like converting text to bytes. Stomp has the same order, but in reality it doesn't really matter. The usage is confusing, really there should just be one API call that does all of that and that is something to look into with any refactor. For the VM transport it's the same, I think either order works as long as it's done before the message is actually copied or sent. VM transport essentially always needs to have messages copied for this reason. In the broker the VMtransport always copies before dispatching to consumers. In terms of how the refactoring would go on the server side I will just have to prototype something. Until I start playing with it I won't really know how it will play out. I am going to close this issue out for now because the other PR fixed the AMQP issue. I can create a new issue for the refactoring investigation -- 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
