What are Building Blocks of a JMS application?



What are Building Blocks of a JMS application?..

Answer / neha

Connection :- It is a virtual connection with JMS provider.

Session :- It is a single threaded context for producing and consuming messages.

Message Producer :- It is created from a session and is using to send messages to destinations.

Message Consumers :- It is also created from a session and is using to receive messages from destination.

Message Selector :- To filter the messages received.

Message :-Message objects are sending in JMS. A JMS message has 3 parts

a)header :- It contains a number of predefined fields using for proper delivery and routing.

b)body :- As the name suggests it is the body of messages. JMS API allows five types of message bodies.

1.TextMessage :- Body contains String data

2.ByteMessage :- Body contains byte data

3. MapMessage :- Body contains data in key/value pair

4.StreamMessage :-Body contains a stream of primitive values

5.ObjectMessage : – Body contains an object

6.Message :- Nothing in body. Only header and properties.

c)properties :- Additional properties other than header.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More JMS Interview Questions

Can JMS utilities automatically re-establish a connection if one side of the communication link (i.e. an application that's sending/receiving messages) goes down and is restarted? Are there APIs to help detect that the other side broke a connection (went down)?

1 Answers  


How does a typical client perform the communication?

1 Answers  


List types of Messaging services supported by JMS?

0 Answers  


Why do the JMS dbms_aqadm.add_subscriber and dbms_aqadm.remove_subscriber calls sometimes hang when there are concurrent enqueues or dequeues happening on the same queue to which these calls are issued?

1 Answers  


Explain about map message?

0 Answers  






Explain about JMS queue?

0 Answers  


How to create an ejb session in order to start a jms connection?

0 Answers  


How to read message from jms queue in java?

0 Answers  


can we implement synchronization for handling multiple messages receieving through Mdb on message

1 Answers   IBM,


What is Publish/Subscribe approach?

0 Answers  


What is jms endpoint?

0 Answers  


What is message listener container?

0 Answers  


Categories