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
What is Point-to-Point Approach?
What is the jms client?
What is jms message queue?
Explain about message selector?
Give an example of using point to point model in JMS?
Can two different jms services talk to each other? For instance, if a and b are two different jms providers, can provider a send messages directly to provider b? If not, then can a subscriber to provider a act as a publisher to provider b?
How to handle non-transacted sessions with respect to jms?
What is a topic in messaging?
How kafka is different from jms?
Mention different types of messages available in JMS API?
What is wire level protocol?
What is jms server?
Are foreign destinations handled within foreign jms messages?
What is a jms session?
What is an object message?