Re: [Dev] Throttling Policy in a JMS Listener

2018-03-15 Thread Vinod Kavinda
Hi,
Yes, the throttle mediator relies on the REMOTE_ADDR property. If you just
need to limit the number of messages allowed, this solution will work. The
throttle mediator will see like all the messages coming from the same IP. I
do not see any issue in that in your use-case.

Thanks,
Vinod

On Thu, Mar 15, 2018 at 7:28 PM, Júnior  wrote:

> Hi,
>
> As I could see, the throttle mediator relies on the remote domain and ip
> to work.
> So, after adding this property before the throttle mediator, it started
> working for JMS as well.
>
> 
>
> Is it a bad practice? Is that a recommended approach?
>
> Thanks,
>
> 2018-03-14 18:36 GMT-03:00 Júnior :
>
>> Hi,
>>
>> I am trying to use the Throttle mediator in a proxy that is listening to
>> a JMS Queue.
>>
>> I would to limit the number of messages it process in a time interval.
>> And the rejected ones would be stored in a messageStore to be processed
>> later.
>>
>> When consuming the messages from queue, it seems the policy is not
>> activated but when I call the proxy from SOAPUI, I see the policy working.
>>
>> Does this work for a jms listener?
>>
>> Follow my policy:
>>
>> 
>> 
>> > xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy; xmlns:wsu="
>> http://docs.oasis-open.org/wss/2004/01/oasis-2004
>> 01-wss-wssecurity-utility-1.0.xsd">
>> > xmlns:throttle="http://www.wso2.org/products/wso2commons/throttle;>
>> > ess>2
>> 
>> other> ttle:ID>
>> 
>> 
>> 
>> 5> ttle:MaximumCount>
>> 1> ttle:UnitTime>
>> > wsp:Optional="true">2000
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> > type="STRING" value="true"/>
>> > type="STRING" value="true"/>
>> http://localhost:8280/services/ChannelAQ"/>
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> Thanks,
>> --
>> Francisco Ribeiro
>> *SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
>>
>
>
>
> --
> Francisco Ribeiro
> *SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Vinod Kavinda
Senior Software Engineer
*WSO2 Inc. - lean . enterprise . middleware .*
Mobile : +94 (0) 712 415544
Blog : http://soatechflicks.blogspot.com/
[image: http://wso2.com/signature]

___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Throttling Policy in a JMS Listener

2018-03-15 Thread Júnior
Hi,

As I could see, the throttle mediator relies on the remote domain and ip to
work.
So, after adding this property before the throttle mediator, it started
working for JMS as well.



Is it a bad practice? Is that a recommended approach?

Thanks,

2018-03-14 18:36 GMT-03:00 Júnior :

> Hi,
>
> I am trying to use the Throttle mediator in a proxy that is listening to a
> JMS Queue.
>
> I would to limit the number of messages it process in a time interval. And
> the rejected ones would be stored in a messageStore to be processed later.
>
> When consuming the messages from queue, it seems the policy is not
> activated but when I call the proxy from SOAPUI, I see the policy working.
>
> Does this work for a jms listener?
>
> Follow my policy:
>
> 
> 
>  xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy; xmlns:wsu="
> http://docs.oasis-open.org/wss/2004/01/oasis-
> 200401-wss-wssecurity-utility-1.0.xsd">
>  xmlns:throttle="http://www.wso2.org/products/wso2commons/throttle;>
> 2 MaximumConcurrentAccess>
> 
> other throttle:ID>
> 
> 
> 
> 5 throttle:MaximumCount>
> 1 throttle:UnitTime>
>  wsp:Optional="true">2000
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  type="STRING" value="true"/>
>  type="STRING" value="true"/>
> http://localhost:8280/services/ChannelAQ"/>
> 
> 
> 
> 
> 
> 
>
> Thanks,
> --
> Francisco Ribeiro
> *SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
>



-- 
Francisco Ribeiro
*SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Throttling Policy in a JMS Listener

2018-03-14 Thread Júnior
Hi,

I am trying to use the Throttle mediator in a proxy that is listening to a
JMS Queue.

I would to limit the number of messages it process in a time interval. And
the rejected ones would be stored in a messageStore to be processed later.

When consuming the messages from queue, it seems the policy is not
activated but when I call the proxy from SOAPUI, I see the policy working.

Does this work for a jms listener?

Follow my policy:



http://schemas.xmlsoap.org/ws/2004/09/policy; xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
">
http://www.wso2.org/products/wso2commons/throttle;>

2

other




5

1
2000



















http://localhost:8280/services/ChannelAQ"/>







Thanks,
-- 
Francisco Ribeiro
*SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev