cshannon commented on PR #1851:
URL: https://github.com/apache/activemq/pull/1851#issuecomment-4148120891

   I confirmed that AMQP does not marshal the data before passing to the broker 
which is probably the issue. You already found where Stomp does it.
   
   Can you try this patch? 
https://github.com/apache/activemq/commit/6002d18b0f17ec5e3f22ec076f5e3d84ea80f4f5
   
   You mentioned that the issue still happens with Stomp which I find 
surprising because that method does clear the text and marshal everything 
before it's passed as you linked. I need to check the Stomp dispatch/send code 
to see if it is copying messages first, maybe it is unmarshaling back to text 
on dispatch without copying causing a race but not sure yet.
   
   For your case with AMQP and network bridges, when the VM transport 
dispatches it should copy before handing off to a consumer, and also the AMQP 
protocol sender will 
[copy](https://github.com/apache/activemq/blob/70caa1b4ad0ed556d6119cd8254348c63a482085/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/protocol/AmqpSender.java#L450)
 the message on dispatch as well because it updates the state and transforms 
it. 
   
   So if the message is already marshaled when incoming, this may fix the issue 
you are seeing, at least for AMQP, so it's at least worth trying to see if the 
small one line patch makes your issue go away as a test.
   
   
   


-- 
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