Hi,

I'm trying to get a sample throttling policy for rate limiting similar to
"Example for a rates-based policy" explained at [1], and I'm having the
policy file as a Registry artifact, separately.

I could get it working with below policy.

<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";
            xmlns:throttle="http://www.wso2.org/products/wso2commons/throttle";>
    <throttle:MediatorThrottleAssertion>
        <wsp:Policy>
            <throttle:ID throttle:type="IP">other</throttle:ID>
            <wsp:Policy>
                <throttle:Control>
                    <wsp:Policy>
                        <throttle:MaximumCount>3</throttle:MaximumCount>
                        <throttle:UnitTime>1000</throttle:UnitTime>
                    </wsp:Policy>
                </throttle:Control>
            </wsp:Policy>
        </wsp:Policy>
    </throttle:MediatorThrottleAssertion>
</wsp:Policy>

But it has unwanted information such as ​"<throttle:ID
throttle:type="IP">other</throttle:ID>". I cannot get rid of that part as
it stops rate limiting. According to the sample at [1], policy should be
simpler.
Any idea how we can simplify this?

​[1]
https://docs.wso2.com/display/EI611/Throttle+Mediator#ThrottleMediator-Example
​

​Thanks.​

-- 
--

Lahiru Sandaruwan
Associate Technical Lead,
WSO2 Inc., http://wso2.com

lean.enterprise.middleware

m: +1 901 530 2379
e: [email protected] b: https://medium.com/@lahirugmg
in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to