Return-Path: X-Original-To: apmail-qpid-commits-archive@www.apache.org Delivered-To: apmail-qpid-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C334310C1D for ; Tue, 5 May 2015 23:48:24 +0000 (UTC) Received: (qmail 5238 invoked by uid 500); 5 May 2015 23:48:24 -0000 Delivered-To: apmail-qpid-commits-archive@qpid.apache.org Received: (qmail 5210 invoked by uid 500); 5 May 2015 23:48:24 -0000 Mailing-List: contact commits-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list commits@qpid.apache.org Received: (qmail 5201 invoked by uid 99); 5 May 2015 23:48:24 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 May 2015 23:48:24 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 941E7E179D; Tue, 5 May 2015 23:48:24 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aconway@apache.org To: commits@qpid.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: qpid-proton git commit: PROTON-827: go binding: partial implementation of concurrent messaging API with examples. Date: Tue, 5 May 2015 23:48:24 +0000 (UTC) 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 Authored: Tue May 5 19:47:45 2015 -0400 Committer: Alan Conway 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