diff options
-rw-r--r-- | qpid/extras/qmf/src/py/qmf/console.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/qpid/extras/qmf/src/py/qmf/console.py b/qpid/extras/qmf/src/py/qmf/console.py index 45004716a8..b663116f40 100644 --- a/qpid/extras/qmf/src/py/qmf/console.py +++ b/qpid/extras/qmf/src/py/qmf/console.py @@ -858,10 +858,16 @@ class Session: dp = msg.get("delivery_properties") if dp: key = dp["routing_key"] - keyElements = key.split(".") - if len(keyElements) == 4: - brokerBank = int(keyElements[2]) - agentBank = int(keyElements[3]) + if key: + keyElements = key.split(".") + if len(keyElements) == 4: + brokerBank = int(keyElements[2]) + agentBank = int(keyElements[3]) + else: + # If there's no routing key in the delivery properties, + # assume the message is from the broker. + brokerBank = 1 + agentBank = 0 agent = broker.getAgent(brokerBank, agentBank) timestamp = codec.read_uint64() |