I've updated the proton Go API, read about it at https://github.com/apache/qpid-proton/blob/master/proton-c/bindings/go/ src/qpid.apache.org/README.md
There are 2 distinct APIs: the "proton" API is a straightforward mapping of the proton C library. The "electron" API is a procedural (not event-driven) concurrent-safe Go API. Electron is implemented under the covers in terms of proton, but is a separate API and does not expose anything from the proton package. The examples include two simple brokers, one written with proton the other with electron, which gives an illustration of the differences. The electron broker is significantly shorter and I think easier to understand. Both brokers use concurrent-safe queues (actually just Go channels for the example) and can process separate connections concurrently. The proton broker has a handler per connection, so all handler state is accessed only in the event loop for that connection and channels are used to transfer messages on/off queues in response to events. We also need to respond to messages becoming available on queues, so a separate goroutine "watches" the queue if a sender runs out of messages. The electron broker, having simple concurrent-safe senders and receivers, can take a simpler approach. We run simple goroutine loops that pull from queues and push to senders, or pull from receivers and push to queues. Cheers, Alan. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org