I have implemented a custom throttle handler which does tenant level
throttling. Throttle policy is stored gov registry same place as tiers.xml
This is my handler configs in api xml.
<handlers>
<handler
class="org.wso2.carbon.apimgt.gateway.handlers.security.CORSRequestHandler">
<property name="apiImplementationType" value="ENDPOINT"/>
</handler>
<handler
class="org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler"/>
<handler
class="org.wso2.carbon.test.gateway.TenantLevelThrottleHandler">
<property name="id" value="B"/>
<property name="policyKey"
value="gov:/apimgt/applicationdata/tier_policies.xml"/>
</handler>
<handler
class="org.wso2.carbon.apimgt.gateway.handlers.throttling.APIThrottleHandler">
<property name="id" value="A"/>
<property name="policyKey"
value="gov:/apimgt/applicationdata/tiers.xml"/>
</handler>
<handler
class="org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageHandler"/>
<handler
class="org.wso2.carbon.apimgt.usage.publisher.APIMgtGoogleAnalyticsTrackingHandler">
<property name="configKey"
value="gov:/apimgt/statistics/ga-config.xml"/>
</handler>
<handler
class="org.wso2.carbon.apimgt.gateway.handlers.ext.APIManagerExtensionHandler"/>
</handlers>
When initializing the throttle policy i am getting " Unable to load
throttling policy using key:
gov:/apimgt/applicationdata/tenant_tier_policies.xml"
It is observed that Entry value for the policyKey is missing in the synapse
messageContext.
What i have done is similar to the blog [1]
Any help would be appreciated.
Thanks.
Ishara Cooray
Senior Software Engineer
Mobile : +9477 262 9512
WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev