rabbitmq-tutorials/go
2017-02-05 20:49:14 -05:00
..
.gitignore .gitignore for Go tutorials 2013-10-17 01:10:14 +04:00
emit_log_direct.go Remove reduncant panic after log.Fatalf 2016-07-01 00:15:03 +00:00
emit_log_topic.go Remove unused import on fmt 2016-07-01 00:13:43 +00:00
emit_log.go Remove reduncant panic after log.Fatalf 2016-07-01 00:15:03 +00:00
new_task.go Remove reduncant panic after log.Fatalf 2016-07-01 00:15:03 +00:00
README.md Changed links to go implementation 2015-09-22 21:07:45 +03:00
receive_logs_direct.go fix spelling in go tutorials 2017-02-05 20:49:14 -05:00
receive_logs_topic.go fix spelling in go tutorials 2017-02-05 20:49:14 -05:00
receive_logs.go fix spelling in go tutorials 2017-02-05 20:49:14 -05:00
receive.go fix spelling in go tutorials 2017-02-05 20:49:14 -05:00
rpc_client.go fix spelling in go tutorials 2017-02-05 20:49:14 -05:00
rpc_server.go fix spelling in go tutorials 2017-02-05 20:49:14 -05:00
send.go Remove reduncant panic after log.Fatalf 2016-07-01 00:15:03 +00:00
worker.go Remove reduncant panic after log.Fatalf 2016-07-01 00:15:03 +00:00

Go code for RabbitMQ tutorials

Here you can find Go code examples from RabbitMQ tutorials.

Requirements

To run this code you need Go RabbitMQ client:

go get github.com/streadway/amqp

Code

Code examples are executed via go run:

Tutorial one: "Hello World!":

go run send.go
go run receive.go

Tutorial two: Work Queues:

go run new_task.go hello world
go run worker.go

Tutorial three: Publish/Subscribe

go run receive_logs.go
go run emit_log.go hello world

Tutorial four: Routing

go run receive_logs_direct.go info warn
go run emit_log_direct.go warn "a warning"

Tutorial five: Topics

go run receive_logs_topic.go "kern.*" "*.critical"
go run emit_log_topic.go kern.critical "A critical kernel error"

Tutorial six: RPC

go run rpc_server.go
go run rpc_client.go 10

To learn more, see Go RabbitMQ client.