title: Mule throttling on a backend service
body: <p>I have a back end service that I need to throttle access to.  I'm trying to use the approach described here: <a href="http://blogs.mulesoft.org/synchronous-and-asynchronous-throttling-2/" rel="nofollow">http://blogs.mulesoft.org/synchronous-and-asynchronous-throttling-2/</a></p>
  
  <p>I started with a simple pass through flow that receives a SOAP request and forwards it.  When I hit this using the SOAPUI utility, I get the expected response in a second or two.</p>
  
  <pre><code>&lt;http:connector name="httpConnector" doc:name="HTTP\HTTPS"&gt;
      &lt;receiver-threading-profile maxThreadsActive="1" maxBufferSize="100" /&gt;
  &lt;/http:connector&gt;
  
  &lt;jms:activemq-connector name="amqConnector" brokerURL="tcp://localhost:61616" specification="1.1" doc:name="AMQ" /&gt;
  
  &lt;flow name="Flow1" processingStrategy="synchronous" doc:name="Flow1"&gt;
  
      &lt;http:inbound-endpoint exchange-pattern="request-response" 
          host="localhost" port="8088" path="test" doc:name="HTTP" 
          mimeType="text/xml" encoding="UTF-8" connector-ref="httpConnector"/&gt;
  
      &lt;http:outbound-endpoint
          address="http://dnbdirect-api.dnb.com/DnBAPI-11"
          exchange-pattern="request-response" doc:name="HTTP" mimeType="text/xml"/&gt;
  &lt;/flow&gt;
  </code></pre>
  
  <p>If I then move the outbound call to a separate flow and add in the request-reply block, the behavior changes.  I get no response back (nor do I get the "After queue" message from the logger) and SOAPUI eventually times out.</p>
  
  <pre><code>&lt;http:connector name="httpConnector" doc:name="HTTP\HTTPS"&gt;
      &lt;receiver-threading-profile maxThreadsActive="1" maxBufferSize="100" /&gt;
  &lt;/http:connector&gt;
  
  &lt;jms:activemq-connector name="amqConnector" brokerURL="tcp://localhost:61616" specification="1.1" doc:name="AMQ" /&gt;
  
  &lt;flow name="Flow1" processingStrategy="synchronous" doc:name="Flow1"&gt;
  
      &lt;http:inbound-endpoint exchange-pattern="request-response" 
          host="localhost" port="8088" path="test" doc:name="HTTP" 
          mimeType="text/xml" encoding="UTF-8" connector-ref="httpConnector"/&gt;
  
      &lt;message-properties-transformer  doc:name="Message Properties"&gt;
          &lt;add-message-property key="AMQ_SCHEDULED_DELAY" value="5000"/&gt;
      &lt;/message-properties-transformer&gt;
  
      &lt;logger message="Before queue" level="INFO"/&gt;
  
      &lt;request-reply&gt;
          &lt;jms:outbound-endpoint queue="request" connector-ref="amqConnector"&gt;&lt;/jms:outbound-endpoint&gt;
          &lt;jms:inbound-endpoint queue="response" connector-ref="amqConnector"&gt;&lt;/jms:inbound-endpoint&gt;
      &lt;/request-reply&gt;  
  
      &lt;logger message="After queue" level="INFO"/&gt;
  &lt;/flow&gt;
  
  &lt;flow name="flow2" doc:name="Flow2"&gt;
  
      &lt;jms:inbound-endpoint queue="request" connector-ref="amqConnector" doc:name="JMS"/&gt;
  
      &lt;http:outbound-endpoint 
          address="http://dnbdirect-api.dnb.com/DnBAPI-11" 
          exchange-pattern="request-response" doc:name="HTTP" mimeType="text/xml" /&gt;
  &lt;/flow&gt;
  </code></pre>
  
  <p>The throttling behavior works as I see the delays if I pull out the call to the back end service.  But I can't get it to work with the service call there.</p>
  
  <p>What am I missing?</p>