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


Please Help Members By Posting Answers For Below Questions

What is spring jms?

455


What are the steps involved in configuring the jms?

483


How to check jms messages in weblogic?

467


How to Configure Open JMS?

1087


What are the three parts of the message?

499






Is rabbitmq jms compliant?

465


What are jms channels?

455


For sending messages through JMS, what encryption options are there?

505


What is the functionality of a jms message producer?

447


What is jms template?

470


What is jms full form?

503


What is the main parts of jms applications?

483


What is jms connection?

473


Can jms be used to send an email?

456


What is the functionality of jms message consumers?

466