Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Finish - Click "Finish" to submit the current data. When finished, your throttle configuration will be applied and the page will be redirected to the previous page.
  • Reset - Click "Reset" to load the last submitted configuration.
  • Default - Click "Default" to load the default throttle configuration. If you want to submit those data, you have to click Finish.
  • Clear - Click "Clear" to clear all the text boxes in the user interface.
  • Cancel - Click "Cancel" to go to the "Service Dashboard" page.

Setting up throttling prior to service deployment

To configure throttling to a service before deploying it, add your throttling configuration in an XML file by the name <service name>_services.xml and save it in <ESB_Home>/repository/deployment/server/<folder_of_the_service_type>For example, to define throttling to a data service by the name CSVSampleService, create CSVSampleService_services.xml in <ESB_Home>/repository/deployment/server/dataservices folder.

Code Block
languagehtml/xml
<service name="CSVSampleService"> 
  <module ref="wso2throttle"/>
  <wsp:Policy wsu:Id="WSO2ServiceThrottlingPolicy">
   <wsp:ExactlyOne>
     <wsp:All>
      <throttle:ServiceThrottleAssertion>
         <wsp:Policy>
           <throttle:ID throttle:type="DOMAIN">10.100.0.205</throttle:ID>
           <wsp:Policy>
             <throttle:Control>
               <wsp:Policy>
                 <throttle:MaximumCount>2</throttle:MaximumCount>
                 <throttle:UnitTime>20000</throttle:UnitTime>
                 <throttle:ProhibitTimePeriod wsp:Optional="true">30000</throttle:ProhibitTimePeriod>
               </wsp:Policy>
             </throttle:Control>
           </wsp:Policy>
         </wsp:Policy>
         <wsp:Policy>
           <throttle:ID throttle:type="DOMAIN">other</throttle:ID>
           <wsp:Policy>
             <throttle:Allow/>
           </wsp:Policy>
         </wsp:Policy>
      </throttle:ServiceThrottleAssertion>
     </wsp:All>
   </wsp:ExactlyOne>
  </wsp:Policy>
</service>
Excerpt
hiddentrue

Instructions on how to manage throttling foe services in WSO2 ESB.