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

Re: TextMessage.getText returning null

I put some text in the (very long) README in the reproduction project that
kind of addresses this, but I didn't really specify that yes - I did throw
in a debug library of the wrapper that printed out when the getText() call
returned null at the call site, and it absolutely is returning null (the
wrapper takes the value and puts it into an immutable object that cannot be
modified...barring reflection hacks that aren't happening).

The library is basically doing :

consumer.addMessageListener(new MessageListener {
  def onMessage(message: Message) = {
    try {
      // extract message body and properties, getText() if it's a
TextMessage, copy fields into
      //   an immutable data structure, hand that off, never touch original
message again
  } //... catch elided

As another datapoint, our code didn't change between the upgrade from AMQ
5.10 to 5.15, this problem appeared, and between those two versions is when
(I believe) the change happened where ActiveMQTextMessage.text was set to
null during (before? after?) marshaling.

Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-Dev-f2368404.html