|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (4)
View Page History }
public boolean void onExpiredAsyncJBIMessage(Exchange subExchange, AsyncContext asyncContext)
throws MessagingException {
[...Handle here the subExchange timeout...]
[...Handle here the subExchange timeout...]
return false;
}
Once all 'sub-exchanges' are received, the 'original' exchange can be retrieve from the asynchronous context and the response or acknowledgement send back explicitly.
If a 'sub-service' do not response at time, the {{onExpiredAsyncJBIMessage(...)}} method will be invoked by the CDK. You must handle the timeout of the 'sub-exchange' in this method.
If a 'sub-service' do not response at time, the {{onExpiredAsyncJBIMessage(...)}} method will be invoked by the CDK. You must handle the timeout of the 'sub-exchange' in this method.
Note that once a {{sendAsync(...)}} has expired, the POJO does not have the ownership of the exchange anymore (because it was sent but never came back) and can't access anything else than the exchangeId and the exchange status! The {{AsyncContext}}, which can be subclassed when needed, is there to store needed information in these situations.
h2. Service Configuration