<div class="docbook"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">Appendix F. Impact of Broker enforced Producer Flow Control on Client</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="JMS-Client-0-8-Appendix-Tomcat-JNDI-Integration.html">Prev</a> </td><th align="center" width="60%"> </th><td align="right" width="20%"> </td></tr></table><hr /></div><div class="appendix"><div class="titlepage"><div><div><h1 class="title"><a id="JMS-Client-0-8-Appendix-ProducerFlowControl-Impact"></a>Appendix F. Impact of Broker enforced Producer Flow Control on Client</h1></div></div></div><p> | |
Producing sessions can be blocked by the Qpid Broker when <span class="emphasis"><em>Producer Flow Control</em></span> is enforced | |
either on | |
<a class="link" href="../../java-broker/book/Java-Broker-Runtime-Disk-Space-Management.html#Java-Broker-Runtime-Disk-Space-Management-Producer-Flow-Control" target="_top">exceeding of disk quota</a> | |
or breaching of queue capacity when | |
<a class="link" href="../../java-broker/book/Java-Broker-Concepts-Queues.html#Java-Broker-Concepts-Queue-OverflowPolicy" target="_top">Producer Flow Control Overflow Policy</a> | |
is configured on queue. | |
</p><p> | |
If a producer sends to a queue which is overfull, the broker will respond by | |
instructing the client not to send any more messages. The impact of this is | |
that any future attempts to send will block until the broker rescinds the flow control order. | |
</p><p> | |
While blocking the client will periodically log the fact that it is blocked waiting on flow control. | |
</p><pre class="programlisting"> | |
WARN Message send delayed by 5s due to broker enforced flow control | |
WARN Message send delayed by 10s due to broker enforced flow control | |
</pre><p> | |
After a set period the send will timeout and throw a JMSException to the calling code. | |
</p><p> | |
If such a JMSException is thrown, the message will not be sent to the broker, | |
however the underlying Session may still be active - in particular if the | |
Session is transactional then the current transaction will not be automatically | |
rolled back. Users may choose to either attempt to resend the message, or to | |
roll back any transactional work and close the Session. | |
</p><p> | |
Both the timeout delay and the periodicity of the warning messages can be set | |
using Java system properties. | |
</p><p> | |
The amount of time (in milliseconds) to wait before timing out | |
is controlled by the property qpid.flow_control_wait_failure. | |
</p><p> | |
The frequency at which the log message informing that the producer is flow | |
controlled is sent is controlled by the system property qpid.flow_control_wait_notify_period. | |
</p><p> | |
Adding the following to the command line to start the client would result in a timeout of one minute, | |
with warning messages every ten seconds: | |
</p><pre class="programlisting"> | |
-Dqpid.flow_control_wait_failure=60000 | |
-Dqpid.flow_control_wait_notify_period=10000 | |
</pre></div><div class="navfooter"><hr /><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="JMS-Client-0-8-Appendix-Tomcat-JNDI-Integration.html">Prev</a> </td><td align="center" width="20%"> </td><td align="right" width="40%"> </td></tr><tr><td align="left" valign="top" width="40%">Appendix E. How to bind Qpid destinations and connection factories into Tomcat JNDI </td><td align="center" width="20%"><a accesskey="h" href="JMS-Client-Book.html">Home</a></td><td align="right" valign="top" width="40%"> </td></tr></table></div></div> |