summaryrefslogtreecommitdiff
path: root/python/qmf/console.py
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2008-11-24 14:07:57 +0000
committerTed Ross <tross@apache.org>2008-11-24 14:07:57 +0000
commitd5cc1feb86956b95406e7223454a8ffd1aa0180d (patch)
tree188748b8bb76c7e858dbcbf7fc36c619de2f828b /python/qmf/console.py
parent4240bf2abbcd48127b889a5197d05d193ab0b2c8 (diff)
downloadqpid-python-d5cc1feb86956b95406e7223454a8ffd1aa0180d.tar.gz
Removed hooks for message credits. This will be implemented correctly later.
The problem with exposing message credits to the API client is that the client doesn't know how many AMQP messages have been received, only how many QMF messages. Since remote agents batch QMF messages into AMQP messages, message credits can't be handled at the QMF API level. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@720197 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qmf/console.py')
-rw-r--r--python/qmf/console.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/python/qmf/console.py b/python/qmf/console.py
index 8ccbefaf47..cdc3ae3406 100644
--- a/python/qmf/console.py
+++ b/python/qmf/console.py
@@ -171,11 +171,11 @@ class Session:
def __repr__(self):
return "QMF Console Session Manager (brokers connected: %d)" % len(self.brokers)
- def addBroker(self, target="localhost", initialTopicCredits=0xFFFFFFFF):
+ def addBroker(self, target="localhost"):
""" Connect to a Qpid broker. Returns an object of type Broker. """
url = BrokerURL(target)
broker = Broker(self, url.host, url.port, url.authMech, url.authName, url.authPass,
- ssl = url.scheme == URL.AMQPS, topicCredits=initialTopicCredits)
+ ssl = url.scheme == URL.AMQPS)
if not broker.isConnected and not self.manageConnections:
raise Exception(broker.error)
@@ -1125,15 +1125,13 @@ class Broker:
""" """
SYNC_TIME = 60
- def __init__(self, session, host, port, authMech, authUser, authPass,
- ssl=False, topicCredits=0xFFFFFFFF):
+ def __init__(self, session, host, port, authMech, authUser, authPass, ssl=False):
self.session = session
self.host = host
self.port = port
self.ssl = ssl
self.authUser = authUser
self.authPass = authPass
- self.topicCredits = topicCredits
self.agents = {}
self.agents[(1,0)] = Agent(self, 0, "BrokerAgent")
self.topicBound = False
@@ -1194,9 +1192,6 @@ class Broker:
auth = ""
return "amqp%s://%s%s:%d" % (ssl, auth, self.host, self.port or 5672)
- def replenishCredits(self, credits):
- self.amqpSession.message_flow(destination="tdest", unit=0, value=credits)
-
def __repr__(self):
if self.isConnected:
return "Broker connected at: %s" % self.getUrl()
@@ -1230,8 +1225,8 @@ class Broker:
accept_mode=self.amqpSession.accept_mode.none,
acquire_mode=self.amqpSession.acquire_mode.pre_acquired)
self.amqpSession.incoming("tdest").listen(self._replyCb)
- self.amqpSession.message_set_flow_mode(destination="tdest", flow_mode=0)
- self.amqpSession.message_flow(destination="tdest", unit=0, value=self.topicCredits)
+ self.amqpSession.message_set_flow_mode(destination="tdest", flow_mode=1)
+ self.amqpSession.message_flow(destination="tdest", unit=0, value=0xFFFFFFFF)
self.amqpSession.message_flow(destination="tdest", unit=1, value=0xFFFFFFFF)
self.isConnected = True