Menu Search

Appendix F. Impact of Broker enforced Producer Flow Control on Client

Producing sessions can be blocked by the Qpid Broker when Producer Flow Control is enforced either on exceeding of disk quota or breaching of queue capacity when Producer Flow Control Overflow Policy is configured on queue.

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.

While blocking the client will periodically log the fact that it is blocked waiting on flow control.

        WARN   Message send delayed by 5s due to broker enforced flow control
        WARN   Message send delayed by 10s due to broker enforced flow control

After a set period the send will timeout and throw a JMSException to the calling code.

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.

Both the timeout delay and the periodicity of the warning messages can be set using Java system properties.

The amount of time (in milliseconds) to wait before timing out is controlled by the property qpid.flow_control_wait_failure.

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.

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: