...
So why do you want to use synchronous Request Only. ? Well if you want to know whether the message was processed sucessfully successfully or not before continuing. With synchronous it allows you to wait while the message is being processed. In case the processing was succesful the control is returned to the client with no notion of error. In case of failure the client can detect this as an exception is thrown. (and exchange.isFailed()
returns true
).
...
Notice: As Camel always returns a Future
handle for Async messaging to the client. The client can then use this handler or not to get hold of the status of the processing whether the task is complete or an Exception occured during processing.
Tip | ||||
---|---|---|---|---|
| ||||
In case you want to know whether the Async Request Only failed, then you can use the |
With these diagrams in mind lets turn out attention to the Async API and how to use it with Camel.
...