Missing methods for ActiveMQBytesMessage

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Missing methods for ActiveMQBytesMessage

Justin Taylor
This doesn't make any sense, and I'm sure I have to be doing something wrong.

I'm trying to consume a message from a queue.  I'm using the 5.7.0 activemq-core JAR from Maven.  I'm getting an ActiveMQBytesMessage object back.  It seems that none of the methods for that class listed in the JavaDocs exist.  In debug, I can see that the object has content, but I'm not able to access it.  FWIW, I'm using Scala.


Has anyone seen anything liket this before?  Any suggestions?


Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Missing methods for ActiveMQBytesMessage

jbertram
What happens if you receive the message in a Java client? Do you see the
expected methods?

What JavaDocs are you looking at for reference?

FWIW, the code for the 5.7.0 version of ActiveMQBytesMessage is here [1].


Justin

[1]
https://github.com/apache/activemq/blob/activemq-5.7.0/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBytesMessage.java

On Wed, Feb 26, 2020 at 10:14 AM Justin Taylor <[hidden email]> wrote:

> This doesn't make any sense, and I'm sure I have to be doing something
> wrong.
>
> I'm trying to consume a message from a queue.  I'm using the 5.7.0
> activemq-core JAR from Maven.  I'm getting an ActiveMQBytesMessage object
> back.  It seems that none of the methods for that class listed in the
> JavaDocs exist.  In debug, I can see that the object has content, but I'm
> not able to access it.  FWIW, I'm using Scala.
>
>
> Has anyone seen anything liket this before?  Any suggestions?
>
>
> Thanks
>
Reply | Threaded
Open this post in threaded view
|

RE: Missing methods for ActiveMQBytesMessage

Justin Taylor
That did the trick.  By converting the sample code to Java I was able to see what it was doing.

It was defining the message variable as javax.jms.Message which doesn't have the correct methods.  When I explicitly defined/cast the message as ActiveMQBytesMessage then it worked.

Thanks



-----Original Message-----
From: Justin Bertram [mailto:[hidden email]]
Sent: Wednesday, February 26, 2020 10:35 AM
To: [hidden email]
Subject: Re: Missing methods for ActiveMQBytesMessage

What happens if you receive the message in a Java client? Do you see the expected methods?

What JavaDocs are you looking at for reference?

FWIW, the code for the 5.7.0 version of ActiveMQBytesMessage is here [1].


Justin

[1]
https://github.com/apache/activemq/blob/activemq-5.7.0/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBytesMessage.java