Series: Subject: Topic:
Question: 14 of 17

What is Producer, Consumer

Sample Source Code : The Producer/Consumer Example

Another very good article with sample source code on How Java uses the producer/consumer model to handle images -- An insider's look . Read the article

Asked by: Interview Candidate | Asked on: Jul 17th, 2005
Showing Answers 1 - 3 of 3 Answers

Answered On : May 3rd, 2005

Producer is who sends the message to the destination. Consumer is who receives the message from destination.

Login to rate this answer.
Jakeer Singh

Answered On : Jul 17th, 2005

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 components:   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.

Login to rate this answer.

Answered On : Oct 17th, 2005

View all answers by evijayshekar

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.

Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.



twitter fb Linkedin GPlus RSS


Interview Question

 Ask Interview Question?


Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.