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 are the different elements present in JMS?

529


How can third-party jdbc driver be used with jms?

460


What is jms full form?

507


What is jms publisher?

454


What are the components of JMS?

526






What is jms in java with example?

453


What is jms connection?

477


What are the functionalities of a jms provider?

495


What is the point-to-point model in jms?

510


What is a queued message?

458


What is a topic?

511


Is kafka a jms?

467


How do the wls jms 6.1 server/destination message maximum and threshold values work?

461


Explain about message listeners?

554


What is a topic in messaging?

512