qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject qpid-proton git commit: PROTON-827: go binding: partial implementation of concurrent messaging API with examples.
Date Tue, 05 May 2015 23:48:24 GMT
Repository: qpid-proton
Updated Branches:
  refs/heads/master 0c11d11cd -> d48fdb69b


PROTON-827: go binding: partial implementation of concurrent messaging API with examples.

Update README with info on running demos, fix a stupid default in send.go


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/d48fdb69
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/d48fdb69
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/d48fdb69

Branch: refs/heads/master
Commit: d48fdb69b7e97ebd8225f7c6eb9b0fdcd2d4980d
Parents: 0c11d11
Author: Alan Conway <aconway@redhat.com>
Authored: Tue May 5 19:47:45 2015 -0400
Committer: Alan Conway <aconway@redhat.com>
Committed: Tue May 5 19:47:45 2015 -0400

----------------------------------------------------------------------
 examples/go/send.go            |  2 +-
 proton-c/bindings/go/README.md | 30 ++++++++++++++++++++++++++++--
 2 files changed, 29 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/d48fdb69/examples/go/send.go
----------------------------------------------------------------------
diff --git a/examples/go/send.go b/examples/go/send.go
index 3c18466..46603bf 100644
--- a/examples/go/send.go
+++ b/examples/go/send.go
@@ -36,7 +36,7 @@ import (
 
 // Command-line flags
 var verbose = flag.Int("verbose", 1, "Output level, 0 means none, higher means more")
-var count = flag.Int64("count", 0, "Send this may messages per address. 0 means unlimited.")
+var count = flag.Int64("count", 1, "Send this may messages per address. 0 means unlimited.")
 
 // Ack associates an info string with an acknowledgement
 type Ack struct {

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/d48fdb69/proton-c/bindings/go/README.md
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/README.md b/proton-c/bindings/go/README.md
index 597481c..cefcae7 100644
--- a/proton-c/bindings/go/README.md
+++ b/proton-c/bindings/go/README.md
@@ -51,8 +51,34 @@ messaging API:
 event API:
 - [broker.go](../../../examples/go/event/broker.go) simple mini-broker
 
-The examples work with each other and with the python `broker.py`,
-`simple_send.py` and `simple_receive.py`.
+The examples work with each other and with the python examples.
+
+To try them out, start a broker with either of:
+
+    python python/broker.py
+    go run go/event/broker.go
+
+The go broker is more informative, the python broker is a strong, silent type.
+
+Now you can send messages to the broker concurrently (10 to each queue foo and bar):
+
+    go run go/send.go -count 10 localhost:/foo localhost:/bar
+
+And receive them concurrently (note count 20, 10 each on 2 queues)
+
+    go run go/receive.go -count 20 localhost:/foo localhost:/bar
+
+You can also try python clients with the go broker. Others should work but that's all I've
tried.
+
+All the example programs have usage messages for more details.
+
+NOTE: they seem slow to run because `go run` *compiles the program and
+all it's libraries then runs it* in one step!! (I'm looking at YOU C++!)
+
+You can build an executable first and run that:
+
+    go build go/send.go
+    ./send ...
 
 ## The event driven API
 


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


Mime
View raw message