+1 for Persist the API with a flag. In the Publisher these apis can be shown as "Publishing in progress".
Then how those apis push to broker, when connection alive? Broker is pull apis or APIM is push? +1 Broker checks with intervals and pull form APIM. On Mon, May 8, 2017 at 2:38 PM, Thilini Shanika <[email protected]> wrote: > 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: [email protected] > > > _______________________________________________ > Architecture mailing list > [email protected] > https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture > > -- Manoj Gunawardena Tech Lead WSO2, Inc.: http://wso2.com lean.enterprise.middleware Mobile : +94 77 2291643
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
