Chapter 48 Using the Request-Reply Communication Pattern
There are two basic Connext entities used by the Request-Reply communication pattern: Requester and Replier.
- A Requester publishes a request Topic and subscribes to a reply Topic. See 48.1 Requesters.
- A Replier subscribes to the request Topic and publishes the reply Topic. See 48.2 Repliers.
- A SimpleReplier is useful for cases where there is a single reply to each request and the reply can be generated quickly, such as looking up some data from memory.
- A SimpleReplier is used in combination with a user-provided SimpleReplierListener. Requests are passed to a callback in the SimpleReplierListener, which returns the reply.
- The SimpleReplier is not suitable if the replier needs to generate more than one reply for a single request or if generating the reply can take significant time or needs to occur asynchronously. For more information, see 48.3 SimpleRepliers.
There is an alternate type of replier known as a SimpleReplier:
Additional resources. In addition to the information in this section, you can find more information and example code here:
- The Connext API Reference HTML documentation1contains example code that will show you how to use the API: From the Modules tab, navigate to Programming How-To’s, Request-Reply Examples.
- The Connext API Reference HTML documentation also contains the full API documentation for the Requester, Replier, and SimpleReplier. Under the Modules tab, navigate to RTI Connext API Reference, RTI Connext Messaging API Reference, Request-Reply Pattern.