Hi All,

As per the APIM 3.0.0 architecture, the events such as APIM create, update,
delete, subscription create etc are notified to gateways through JMS Topic
in the broker. Thus, we need to smoothly handle the scenarios like *broker
not available* and *APIM to Broker connection(network) failure,* since the
flow cannot be completed without notifying the gateway (A blocking call).
Ideally, if the API action cannot be completed due to broker connection
failure, the users should be notified about the failure and the action
should be rolled back.

But, we are facing some difficulties to handle topic publishing failures
and rollback API action(API create, API state change, API update, API
delete, subscription create, subscription block) since the API action is
getting persisted in APIM db layer prior to publishing to Gateway.

For example, if an API create request is initiated from API core, first,
the API will be persisted in db layer. Then the API create event will be
published to Topic and the registered gateways will be notified. But if the
broker publishing step is failed, the gateways will not be notified on the
newly created API so that the API won't be published to gateway. This might
lead the API to go to an inconsistent/partially created state (API is
successfully created in db, but not pushed to gateway).

​
Currently, we have not implemented any mechanism to

   - Rollback the action, or
   - Persist the inconsistent state as a flag in API so that the user is
   aware of the inconsistent state

What would be the best way to handle broker failures? Any suggestions?

Thanks
-- 
Thilini Shanika
Senior Software Engineer
WSO2, Inc.; http://wso2.com
20, Palmgrove Avenue, Colombo 3

E-mail: tgtshan...@gmail.com
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to