I read the messages using a message driven POJO in Spring 2.0. The
ActiveMQBytesMessage extends an ActiveMQMessage so you can use the methods
available in ActiveMQMessage, such as getStringProperty, to read the
message properties. I have my code at work but I think this is an example
that might be helpful:
if (message instanceof BytesMessage) {
try {
log.debug("This is the message type:" +
message.getJMSType() + "\n\n" +
message);
//HERE YOU ARE GETTING A PROPERTY
log.debug("This is the invocation property" +
message.getStringProperty("invocation") + "\n\n" + message);
messageId = ((ActiveMQBytesMessage)message).getGroupID();
ByteSequence bs =
((ActiveMQBytesMessage)message).getContent();
fos.write(bs.getData());
} catch (JMSException e) {
throw new RuntimeException(e);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
--
View this message in context:
http://www.nabble.com/ActiveMQ-Outputstream-message-properties-tf1807819.html#a5232815
Sent from the ActiveMQ - User forum at Nabble.com.