1

using ActiveMQ I want to serialize my objects with protocol buffers (*). Then I have an byte array.
Now I read that ByteMessage should not be used with properties:

http://activemq.apache.org/nms/msdoc/1.5.0/vs2005/html/T_Apache_NMS_IBytesMessage.htm
(They have the same text in the java documentation, too)

Where is the problem, and when will the problems occur?

(*) We use this format internally, if possible I want to use is as message body, too.

Chris
  • 4,325
  • 11
  • 51
  • 70

1 Answers1

2

There shouldn't be any problem with using message properties in BytesMessage object with ActiveMQ. The NMS docs just have some similar warnings as the JMS spec as its meant to be generic per provider so in other providers this might not be the case but should work without any issue in ActiveMQ.

Tim Bish
  • 17,475
  • 4
  • 32
  • 42
  • Thank you for your answer. But if an issue occurs, how would I know that one occurred? What will happen? Would I be save if I make a checksum from my byte message and send it with the message? You wrote "should work without any issue". – Chris Sep 24 '11 at 09:20
  • The message body and the properties are distinct data sets in ActiveMQ so setting a property has no effect on the body of the message. You are free to set a checksum header on the Message if you like it won't hurt anything and provides you will an extra level of confidence in the integrity of the message. – Tim Bish Sep 24 '11 at 10:13