activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <>
Subject Re: Message Property Type Always String?
Date Mon, 16 Apr 2018 16:44:47 GMT
On 04/13/2018 11:52 AM, Tom Parsons wrote:
> Hello Forum-
> I'm a new user of ActiveMQ CMS (ActiveMQ-cpp-3.9.3), and new to JMS as well.
> I am creating, formatting, and sending test messages to myself to start.  In
> my code to consume those message, I check the property type of all the
> message properties.
> I noticed that the property type of all the properties of a message is being
> reported as STRING_TYPE.  This includes several pre-defined properties that
> I would not think would be strings, such as the "persistent" flag (I
> would've thought it was a boolean), "priority" (I would think integer),
> "timestamp" (I would think long?).  I also created a user-defined integer
> property, which upon receipt is also assessed to be a string.
> Am I misunderstanding something about how the property types work?

I don't recall exactly how it all works but it would surprise me if all 
values were string types unless that is what you put in there in the 
first place.  For some of the default message properties like CMSGroupId 
or others I suppose the code might not be smart enough to guess what 
they are unless actually present.  For user defined message properties 
like message.setIntProperty(k, v) the typing should be correct.

Tim Bish
twitter: @tabish121

View raw message