rabbitmq-go

command module
v0.0.0-...-087feed Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2023 License: MIT Imports: 9 Imported by: 0

README

rabbitmq-go

Go code for RabbitMQ

Experimenting with RabbitMQ on your workstation? Try the following Docker image:

latest RabbitMQ 3.12

docker run -it --rm --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3.12-management

Requirements

These examples use the rabbitmq/amqp091-go client library. Get it first with

go get github.com/rabbitmq/amqp091-go

Code

Code examples are executed via go run:

"Hello World!":

go run send.go
go run receive.go

image

Work Queues:

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

image

Publish/Subscribe

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

image

Routing

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

image

Topics

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

image

RPC

go run rpc_server.go
go run rpc_client.go 10

image

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL