Can I use JMS to simulate a synchronous request (like invoking using RMI)?
Yes, you can use a TopicRequestor or a QueueRequestor. A requestor is a concrete class in the javax.jms package, which sends a JMS message on a regular destination with the ReplyTo field set to a newly created temporary destination. Application developers are responsible for implementing the consumer, which must send a message back to the ReplyTo destination. Once the requestor receives a reply on the temporary topic, the reply is handed back to the user of the requestor.
Related Questions
- Why do I get a javax.naming.NameNotFoundException error when I run the JMS example programs in "A Simple Example of Synchronous Message Receives" in Chapter 33?
- Why doesn’t the JMS API provide end-to-end synchronous message delivery and notification of delivery?
- Can I use JMS to simulate a synchronous request (like invoking using RMI)?