Date: Thu, 28 Mar 2024 21:44:00 +0000 (UTC) Message-ID: <416305191.11.1711662240381@a531d3d33586> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_10_127729842.1711662240381" ------=_Part_10_127729842.1711662240381 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
OpenHub framework allows to garant processing order of= messages. This functionality garants that incoming messages with the same = funnel_value will start processing in order by msgTimesta= mp (timestamp from source system) and next message won't start be= fore previous message isn't finished.
Guaranteed message processing order takes all the following states into = consideration: PROCESSING, WAITING, WAITING= _FOR_RES, PARTLY_FAILED, FAILED and POSTPONED. FAILE= D state is used by default but can be excluded.
It can happen that first message failed and then all next messages will = wait to start processing (message state will change to POSTPONED a= gain and again).
There is new configuration parameter asynch.po= stponedIntervalWhenFailed that determines interval (in seconds) after = that postponed messages will fail.
Msg-funnel component filters messages in one specific place o= f the processing but this gauranteed processing order functionality is for = wholes routes at the beginning.
There are the following types of message filtering:
Use org.openhubframework.openhub.api.asynch.AsynchRouteBuilder&= nbsp;with methods withGuaranteedOrder() or withGuara= nteedOrderWithoutFailed() (see Asynchronous= messages for more details) or sets AsynchConstants.GUARANTEED= _ORDER_HEADER or AsynchConstants.EXCLUDE_FAILED_HEADER t= o true when you create route definition manually.
private= void createRouteForAsyncHelloRouteIn() throws FailedToCreateRouteException= { =09Expression funnelValueExpr =3D xpath("/h:asyncHelloRequest/h:name").name= spaces(ns).stringResult(); AsynchRouteBuilder.newInstance(ServiceEnum.HELLO, OPERATION_NAME, getInWsUri(new QName(SyncHelloRoute.HELLO_SERVICE_NS, "asyncHel= loRequest")), new AsynchResponseProcessor() { @Override protected Object setCallbackResponse(CallbackResponse callb= ackResponse) { AsyncHelloResponse res =3D new AsyncHelloResponse(); res.setConfirmAsyncHello(callbackResponse); return res; } }, jaxb(AsyncHelloResponse.class)) =09=09=09.withFunnelValue(funnelValueExpr) .withGuaranteedOrder() .build(this); }