What are Building Blocks of a JMS application?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Give an example of using the publish/subscribe model.

466


What happens when jms queue is full?

451


What is jms active mq?

459


Explain Synchronous Message Consumption in JMS?

1054


What is JMS administered object?

544






What is Publish/Subscribe approach?

1029


Does kafka support jms?

459


Which are the benefits of mdb (message driven beans) over standard jms consumers?

456


What is an object message?

490


What is a jms listener?

467


How does jms queue work?

457


What is mean by jms?

475


How many types of messaging model do JMS provide for and what are they?

510


What is a message topic?

480


Can two different jms services talk to each other? For instance, if a and b are two different jms providers, can provider a send messages directly to provider b? If not, then can a subscriber to provider a act as a publisher to provider b?

490