[
https://issues.apache.org/jira/browse/PROTON-2091?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jiri Daněk reassigned PROTON-2091:
----------------------------------
Assignee: Jiri Daněk
> [python] example broker never removes empty queues
> --------------------------------------------------
>
> Key: PROTON-2091
> URL: https://issues.apache.org/jira/browse/PROTON-2091
> Project: Qpid Proton
> Issue Type: Bug
> Components: python-binding
> Affects Versions: proton-c-0.29.0
> Reporter: Jiri Daněk
> Assignee: Jiri Daněk
> Priority: Trivial
>
> {code:python:title=python/examples/broker.py}
> def unsubscribe(self, consumer):
> if consumer in self.consumers:
> self.consumers.remove(consumer)
> return len(self.consumers) == 0 and (self.dynamic or
> self.queue.count == 0)
> {code}
> Here, {{self.queue.count == 0}} can never be {{True}} (because method
> reference != integer). This means that broker will never drop the {{Queue}}
> object.
> Functionality wise, the impact of this is insignificant, given the uses of
> the code (stand-in for real broker when running simple messaging examples).
> It has compatibility implications, however, because {{self.queue.count}} is a
> Python 2.7 addition and on Python 2.6 accessing undefined property will raise
> exception and crash the broker.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]