activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ychawla <premiergenerat...@yahoo.com>
Subject Re: ActiveMQ Outputstream message properties
Date Sat, 08 Jul 2006 17:24:54 GMT

Again, I apologize, I have updated code at work which I did not check in so I
can not access now.  This should work to read the BytesMessage.  The last
message in the sequence will be, I think, a StreamMessage with a group
sequence of -1 and this will indicate to you that you are at the end of your
file and you can close the stream.

ActiveMQInputStream streamMsg = (ActiveMQInputStream
)connection.createInputStream();
ActiveMQMessage message = streamMsg.receive();
message.getStringProperty("fileName"); 
ByteSequence bs = ((ActiveMQBytesMessage)message).getContent();
fos.write(bs.getData()); 


-- 
View this message in context: http://www.nabble.com/ActiveMQ-Outputstream-message-properties-tf1807819.html#a5233075
Sent from the ActiveMQ - User forum at Nabble.com.


Mime
View raw message