extcall
OpenHub framework component for wrapping external calls with checks for duplicate and outdated calls.
The URI format is the following:Â extcall:[keyType]:[targetURI].Â
Parameter keyType can be one of:
- message - to generate a key based on message source system and correlation ID, effectively providing duplicate call protection, but not obsolete call protection
- entity - to generate a key based on message objectId property, providing both duplicate call protection and obsolete call protection
- custom - to use a custom key provided in the ExtCallComponentParams.EXTERNAL_CALL_KEY exchange property
In the first two cases (message and entity), if the ExtCallComponentParams.EXTERNAL_CALL_KEY exchange property is provided, it will be appended to the generated key.
By default, the targetURI is used as the operation. This can be changed by providing an optional ExtCallComponentParams.EXTERNAL_CALL_OPERATION exchange property. The targetURI will still be the URI that is called, if the external call is not skipped, but the duplicate/obsolete protection logic will use the ExtCallComponentParams.EXTERNAL_CALL_OPERATION value for checking, if the call should be made or skipped.
Explanation
- two external systems are called during message processing
- there are two extcall's stops to which we can return during processing
- if error occurresÂ
- before first request to external system 1 then then next processing try will start from the beginning, same as new message arrives
- during communication with external system 2 then next processing try will start from extcall1
- after successful response from external system 2 then next processing try will start from extcall2
Example
.to("extcall:message:direct:printGreeting") .to("extcall:custom:direct:printGreeting")