From f6f519835a049e53f13af818e26decba1fc82f3d Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Mon, 2 Feb 2009 22:28:17 +0000 Subject: Send client property indicating that client supports producer throttling in the Connection.OpenOK message. Broker only tries to apply flow control to client if it has received the property in the Connection.OpenOK message. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@740135 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/ConnectionHandler.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cpp/src/qpid/broker/ConnectionHandler.cpp') diff --git a/cpp/src/qpid/broker/ConnectionHandler.cpp b/cpp/src/qpid/broker/ConnectionHandler.cpp index 86123d346f..f136d61462 100644 --- a/cpp/src/qpid/broker/ConnectionHandler.cpp +++ b/cpp/src/qpid/broker/ConnectionHandler.cpp @@ -45,6 +45,8 @@ const std::string PLAIN = "PLAIN"; const std::string en_US = "en_US"; const std::string QPID_FED_LINK = "qpid.fed_link"; const std::string QPID_FED_TAG = "qpid.federation_tag"; +const std::string SESSION_FLOW_CONTROL("qpid.session_flow"); +const int SESSION_FLOW_CONTROL_VER = 1; } void ConnectionHandler::close(connection::CloseCode code, const string& text) @@ -139,6 +141,9 @@ void ConnectionHandler::Handler::startOk(const framing::FieldTable& clientProper } QPID_LOG(info, "Connection is a federation link"); } + if ( clientProperties.getAsInt(SESSION_FLOW_CONTROL) == SESSION_FLOW_CONTROL_VER ) { + connection.setClientThrottling(); + } } void ConnectionHandler::Handler::secureOk(const string& response) -- cgit v1.2.1