[
https://issues.apache.org/jira/browse/AMQ-6981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16497090#comment-16497090
]
Christopher L. Shannon commented on AMQ-6981:
---------------------------------------------
Based on the storeContentAndClear() being the issue (because text is nulled) it
would seem that when using the VM transport something isn't quite thread safe
somewhere. The message is supposed to be copied so there shouldn't be two
threads at the same time trying to marshall/unmarshall the data but based on
the behavior seen either something in the test case or the broker is causing a
race condition here
> ActiveMQText message can return null when using VMTransport
> -----------------------------------------------------------
>
> Key: AMQ-6981
> URL: https://issues.apache.org/jira/browse/AMQ-6981
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker, JMS client
> Affects Versions: 5.15.4
> Reporter: Christopher L. Shannon
> Priority: Major
>
> The issue seems to involve using the VMTransport, however it's possible it
> could be something else because the NIO transport is also used in the test
> case.
> The original bug report is here:
> [http://mail-archives.apache.org/mod_mbox/activemq-dev/201805.mbox/%3C1527716475007-0.post%40n4.nabble.com%3E]
> Test Report is here:
> [https://github.com/CodeMettle/amq_null_body_repro]
> Originally I thought this had to do with concurrently accessing getText() on
> a message but the VM transport should copy the message to each consumer
> before dispatch so something else seems to be going on.
> It's possible that there's something specific to the test case (ie a bug in
> the client code) or an issue in the broker that causes the null message body
> but this needs to be looked at closer to determine the problem.
> Also, as a side note, there is no specific synchronization in the client
> message objects as they are supposed to be used in a single thread which is
> why they are copied on dispatch if using the VM transport.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)