activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RobBugh <>
Subject How to Retrieve Message Properties
Date Mon, 20 Aug 2007 18:49:56 GMT

I'm having problems retrieving custom properties set on TextMessages. I have
a persistent queue to pass messages between a simple producer and consumer.
The producer sets several properties on a TextMessage such as,
        TextMessage message = m_session.createTextMessage("EMSSyncRequest");
        message.setStringProperty("JMSXGroupID", request.getGroupID());
        message.setIntProperty("EType", request.getType());
        message.setStringProperty("EFile", request.getMsg());

However, when the consumer gets the message the values for EType and EFile
are null. Trying to retrieve EType via getIntProperty throws an exception.
In the message object I see that the propery field in null but the
marshalledProperties field is not. I suspect the properties have been
marshalled. How do I go about unmarshalling the properties?

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message