[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

TextMessage.getText returning null

We recently updated from (ancient) ActiveMQ 5.10.x to 5.15.4. I've noticed
that text messages are now sporadically returning null as their message
bodies when they were sent with bodies.

After failing to make a unit test showing this error, I created a project
that reproduces part of what our software is doing, which reliably
replicates the race condition (my last run got null message bodies on ~0.03%
of messages). I was able to vastly simplify what our software is doing and
still reproduce, but when I tried to simplify further the issue stopped

Reproduction and full explanation:

Since I don't have a self-contained unit test I was hesitant to open an
issue directly and decided to send a message here instead.

I'm a Scala/Akka developer, so I used the tools I was comfortable with to
make this reproduction without writing a lot of code, but I'm sure somebody
more comfortable in Java and the ActiveMQ API could reproduce in a unit
test. I'm assuming it has something to do with multiple Sessions consuming
the same topic and calling TextMessage.getText at the same time.

Any suggestions of what to do next?


Sent from: