Hi Lahiru,

I experienced the same behaviour with rate-based policy. Even though the
above example shows the policy without throttle: type attribute, the policy
will not get apply without that attribute. It seems its mandatory to define
this.

If the "throttle: type" attribute is mandatory for the rate based policy,
we may need to correct the documentation accordingly.

Regards,
Sashika

On Fri, Jan 12, 2018 at 2:48 AM, Lahiru Sandaruwan <lahi...@wso2.com> wrote:

> 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 <(901)%20530-2379>
> e: lahi...@wso2.com b: https://medium.com/@lahirugmg
> in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 

*Sashika WijesingheSoftware Engineer - QA Team*
Mobile : +94 (0) 774537487
sash...@wso2.com
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to