1 Reply Latest reply on Jan 2, 2014 10:49 PM by kcbabo

    Confusion about Throttler

    jbride

      Hi.

      I'm experimenting with the SY throttler (using the 1.1.1-p2 tag of supported SY) and am observing what already seems to be described in SY-1718:  Throttling timePeriod configuration in switchyard.xml not used at runtime.  In particular :

       

      1)  maxRequests=1 ;  timePeriod=1000 ;    observation :     max 1 request/second  through the composite service; so this is good

      2)  maxRequests=2 ;  timePeriod=1000 ;    observation :     max 2 requests/second through the composite service; so this is good

      3)  maxRequests=1 ;  timePeriod=5000 ;    observation :     max 1 request/second through the composite service;  not what i was expecting but SY-1718 describes the problem in that the timePeriod config in switchyard.xml seems to be ignored at runtime

       

      In my test scenarios, the value of timePeriod is set statically in switchyard.xml.  The modified SY app is subsequently re-deployed to the server.

       

      My question is: 

          The Jira is in a 'resolved" status but i'm not clear what the resolution is?  Is there a work-around for those scenarios that require a throttling rate slower than 1 request / second ?

       

      Debugging through ExchangeDispatcher.java (even in the master branch of community switchyard), it appears that the correct value for timePeriod is present but is not used when sending to the Camel ProducerTemplate.

       

      thank you!

       

      jeff

        • 1. Re: Confusion about Throttler
          kcbabo

          Hey Jeff,


          Good catch.  Unfortunately, it looks like the deployer is updating the service reference used by the composite service after the Camel bus route is created.  I have updated the BZ with more detail.