6.7. Writing Request/Response Applications in Java JMS
In the request/response examples, we write a server that accepts strings from clients and converts them to upper case, sending the result back to the requesting client. This example consists of two programs.
Client.java is a client application that sends lines of poetry to the server.
Server.java is a simple service that accepts messages, converts their content to upper case, and sends the result to the amq.direct exchange, using the request's reply-to property as the routing key for the response.