What is the difference between Byte Message and Stream Message?
Answer Posted / munnu
Bytes Message stores data in bytes. Thus the message is one contiguous stream of bytes. While the Stream Message maintains a boundary between the different data types stored because it also stores the type information along with the value of the primitive being stored. Bytes Message allows data to be read using any type. Thus even if your payload contains a long value, you can invoke a method to read a short and it will return you something. It will not give you a semantically correct data but the call will succeed in reading the first two bytes of data. This is strictly prohibited in the Stream Message. It maintains the type information of the data being stored and enforces strict conversion rules on the data being read.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain the creation of JMS Administered objects?
Is it possible to create both queues and topics to single jms server? if yes then how it works?
Which messaging modes are included in the java messaging service jms )?
What is the use of EventMessage.java?
How do I use a startup class to initialize and later reference jms objects?
What is hermes software?
What is message listener?
Detail about the features of publish model?
How to Set message priority levels?
What is jms connection?
What type of messaging is provided by JMS?
What are the components of a jms messaging application?
What is a queued message?
Explain about the exception handling mechanism of JMS?
How does jms queue work?