... | ... | @@ -170,9 +170,9 @@ You can notice that no port was provided to define the requester and responder. |
|
|
|
|
|
Be careful, the responder must receive requests in a loop after *init()* otherwise any requester will block when initializing.
|
|
|
|
|
|
Notice that the responder can reply many times for the same request. The requester must then have as many receive() calls as the number of replies.
|
|
|
Notice that the responder can reply **multiple times** for the same request. The requester must then have as many receive() calls as the number of replies.
|
|
|
|
|
|
Notice that we presented the basic responder which cannot process requests in parallel. A single thread must be used to receive and reply. If you need to process the requests in parallel, then you have to create some multi responders.
|
|
|
Notice that we presented the basic responder which cannot process requests in parallel. A **single thread** must be used to receive and reply. If you need to process the requests in parallel, then you have to create some multi responders.
|
|
|
|
|
|
# Multi responders
|
|
|
|
... | ... | @@ -226,7 +226,7 @@ catch (InitException e) { |
|
|
}
|
|
|
|
|
|
```
|
|
|
Once the router is receiving a request from a requester, it forwards it to a multi responder (round-robin distribution) that can process it in its own thread. It can also reply multiple times. The router run() call is blocking and the router must be canceled to return.
|
|
|
Once the router is receiving a request from a requester, it forwards it to a multi responder (round-robin distribution) that can process it in its **own thread**. It can also reply multiple times. The router run() call is **blocking** and the router must be canceled to return.
|
|
|
|
|
|
|
|
|
# Publisher/Subscriber
|
... | ... | |