What is the difference between Byte Message and Stream Message?



What is the difference between Byte Message and Stream Message?..

Answer / 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

More JMS Interview Questions

What is jms and how it works?

0 Answers  


Name the components of jms.

0 Answers  


What is a message topic?

0 Answers  


what is distributed queues and topics and how they works

1 Answers  


What are the core JMS-related objects required for each JMS-enabled application?

1 Answers  






What is a bytes message?

0 Answers  


What is a distributed queue?

0 Answers  


What are Native Clients ?

1 Answers  


Can we send message from one server to another server using jms?

0 Answers  


What are the different parts of a jms message?

0 Answers  


What is jms connection?

0 Answers  


What is jms server?

0 Answers  


Categories