What is the use of BytesMessage?
Answer / munnu
BytesMessage contains an array of primitive bytes in it's payload. Thus it can be used for transfer of data between two applications in their native format which may not be compatible with other Message types. It is also useful where JMS is used purely as a transport between two systems and the message payload is opaque to the JMS client. Whenever you store any primitive type, it is converted into it's byte representation and then stored in the payload. There is no boundary line between the different data types stored. Thus you can even read a long as short. This would result in erroneous data and hence it is advisable that the payload be read in the same order and using the same type in which it was created by the sender.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the difference between the P2P (Peer to Peer) model and subscribe model?
What are the types of communication provided by jms?
What are the types of messaging?
What is the difference between an sms and text message?
What are the core JMS-related objects required for each JMS-enabled application?
What are the components of JMS?
What is the use of jms?
How many types of messaging model do JMS provide for and what are they?
How do I start wls and configure jms?
In which situations we are using jms? Can we send message from one server to another server using jms?
Is it possible to create both queues and topics to single jms server? if yes then how it works?
How to read message from jms queue in java?