You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2018/12/20 04:16:47 UTC

[qpid-proton] branch master updated (b456360 -> ffe4915)

This is an automated email from the ASF dual-hosted git repository.

astitcher pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git.


    from b456360  PROTON-1984: [c] Avoid O(n^2) complexity in pn_data_inspect - Rework original change to preserve correct stringifying of pn_data_t - Unfortunately restores some potential O(n^2) behaviour but in many   fewer cases.
     new 5d769bc  PROTON-1985: [Python] Actually make default to listen forever - Bug in current behaviour such that default ends up throwing every message away
     new ffe4915  PROTON-1986: [Python] Make example broker work with anonymous links - If you receive a message on a link with no target address then use the message address

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 python/examples/broker.py  | 5 ++++-
 python/examples/db_recv.py | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[qpid-proton] 02/02: PROTON-1986: [Python] Make example broker work with anonymous links - If you receive a message on a link with no target address then use the message address

Posted by as...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

astitcher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git

commit ffe4915f609e1afe901d8cea7c38d3c0b83daa6e
Author: Andrew Stitcher <as...@apache.org>
AuthorDate: Wed Dec 19 22:56:26 2018 -0500

    PROTON-1986: [Python] Make example broker work with anonymous links
    - If you receive a message on a link with no target address then use the message address
---
 python/examples/broker.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/python/examples/broker.py b/python/examples/broker.py
index bbbd4f9..67eb216 100755
--- a/python/examples/broker.py
+++ b/python/examples/broker.py
@@ -112,7 +112,10 @@ class Broker(MessagingHandler):
         self._queue(event.link.source.address).dispatch(event.link)
 
     def on_message(self, event):
-        self._queue(event.link.target.address).publish(event.message)
+        address = event.link.target.address
+        if address is None:
+            address = event.message.address
+        self._queue(address).publish(event.message)
 
 parser = optparse.OptionParser(usage="usage: %prog [options]")
 parser.add_option("-a", "--address", default="localhost:5672",


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[qpid-proton] 01/02: PROTON-1985: [Python] Actually make default to listen forever - Bug in current behaviour such that default ends up throwing every message away

Posted by as...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

astitcher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git

commit 5d769bc802ea72bc8f700449472705e904572cf3
Author: Andrew Stitcher <as...@apache.org>
AuthorDate: Wed Dec 19 22:54:33 2018 -0500

    PROTON-1985: [Python] Actually make default to listen forever
    - Bug in current behaviour such that default ends up throwing every message away
---
 python/examples/db_recv.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/examples/db_recv.py b/python/examples/db_recv.py
index 8c79049..ce27470 100755
--- a/python/examples/db_recv.py
+++ b/python/examples/db_recv.py
@@ -55,7 +55,7 @@ class Recv(MessagingHandler):
     def on_message(self, event):
         id = int(event.message.id)
         if (not self.last_id) or id > self.last_id:
-            if self.received < self.expected:
+            if self.expected == 0 or self.received < self.expected:
                 self.received += 1
                 self.last_id = id
                 self.db.insert(id, event.message.body, ApplicationEvent("record_inserted", delivery=event.delivery))


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org