Hi, In the current design of the API Manager we have to hard-code the production endpoint (and/or sandbox endpoint) at the time of creating the API. What if there is a requirement to determine the endpoint at runtime? For example determining the proper endpoint depending on a user's current location. It would be a valid requirement IMO.
For supporting above, we could ask users to write a class mediator which defines the logic in determining the endpoint and set it as the 'To' header from within the mediator itself. When routing the message, we could use a synapse default endpoint instead of routing to the hard-coded url. At the time of API creation, the name of this mediator will have to be provided on the UI so that using it, we can generate the synapse configuration of the API. We will have to think through synchronizing the mediator among a cluster of gateways and on deploying them on the fly. The above are my initial thoughts on $subject. Suggestions and feedback welcome. Thanks, NuwanD. -- Nuwan Dias Senior Software Engineer - WSO2, Inc. http://wso2.com email : [email protected] Phone : +94 777 775 729
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
