What is the difference between Message producer and
Messaging systems provide a host of powerful advantages
over other conventional distributed computing models.
Primarily, they encourage "loose coupling" between
message consumers and message producers. There is a high
degree of anonymity between producer and consumer: to
the message consumer, it doesn't matter who produced the
message, where the producer lives on the network, or
when the message was produced.
In Publish/Subscribe model:
A publish/subscribe (pub/sub) messaging system supports
an event driven model where information consumers and
producers participate in the transmission of messages.
Producers "publish" events, while consumers "subscribe"
to events of interest, and consume the events. Producers
associate messages with a specific topic, and the
messaging system routes messages to consumers based on
the topics the consumers register interest in.
In Point-To-Point model:
In point to point messaging systems, messages are routed
to an individual consumer which maintains a queue of
"incoming" messages. Messaging applications send
messages to a specified queue, and clients retrieve
messages from a queue.
In Point-To-Point model, one client can send message to
the another client through the Destination.
There is a guarantee to recieve the message whenever
reciever is connected.
example:your telephone answering machine ,outer send a
message to u,but you can recieve those msg whenever u
coonected to answering machine.
In pub/sub model. one publisher,many no.of clients
willbe there,publisher publish the message,subscriber or
consumer can recieve those messages when he got
subscription through the topic.There is no guarantee
consumer can recieve the messages send by the publisher.
What is JMS application ?
One or more JMS clients that exchange messages.
What type messaging is provided by JMS ?
Both synchronous and asynchronous are provided by JMS.
How JMS is different from RPC?
In RPC the method invoker waits for the method to finish
execution and return the control back to the invoker.
Thus it is completely synchronous in nature. While in
JMS the message sender just sends the message to the
destination and continues it's own processing. The
sender does not wait for the receiver to respond. This
is asynchronous behavior.
What Is the JMS API?
The Java Message Service is a Java API that allows
applications to create, send, receive, and read
messages. Designed by Sun and several partner companies,
the JMS API defines a common set of interfaces and
associated semantics that allow programs written in the
Java programming language to communicate with other
The JMS API minimizes the set of concepts a programmer
must learn to use messaging products but provides enough
features to support sophisticated messaging
applications. It also strives to maximize the
portability of JMS applications across JMS providers in
the same messaging domain.
The JMS API enables communication that is not only
loosely coupled but also
* Asynchronous. A JMS provider can deliver messages to a
client as they arrive; a client does not have to request
messages in order to receive them.
* Reliable. The JMS API can ensure that a message is
delivered once and only once. Lower levels of
reliability are available for applications that can
afford to miss messages or to receive duplicate
The JMS Specification was first published in August
1998. The latest version of the JMS Specification is
Version 1.1, which was released in April 2002. You can
download a copy of the Specification from the JMS Web
What is JMS client ?
A Java language program that sends or receives messages.
Give an example of using the point-to-point model
The point-to-point model is used when the information is
specific to a single client. For example, a client can
send a message for a print out, and the server can send
information back to this client after completion of the
What is Producer and Consumer?
Messaging lets a servlet delegate processing to a batch
process either on the same machine or on a separate
machine. The servlet creates a message and sends it to a
queue. The servlet immediately completes and when the
batch process is ready, it processes the message.
Messaging is therefore comprised of three main
A Producer creates messages and sends them to a Queue.
The Producer could be something like a Servlet.
A Queue stores the messages from the Produces and
provides them to a Consumer when ready. The Queue is
implemented by the messaging provider.
A Consumer processes messages as they become available
in the Queue. The Consumer is typically a bean
implementing the MessageListener interface.
A producer is the client application that plays the role
of a message sender in JMS API.
A consumer is the client application that plays the role
of a message receiver in JMS API.
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)?
Yes. You can write a snooper files to detect the service
and restart the node upon node fail and a server
What is the Role of the JMS Provider?
The JMS provider handles security of the messages, data
conversion and the client triggering. The JMS provider
specifies the level of encryption and the security level
of the message, the best data type for the non-JMS
What is JMS provider?
A messaging system that implements the Java Message
Service as well as other administrative and control
functionality needed in a full-featured messaging
Page Numbers : 1