rabbitmq-tutorials/go-stream
2024-07-09 16:18:20 +02:00
..
go.mod Use stream Go client 1.4.6 2024-07-09 10:29:44 +02:00
go.sum Use stream Go client 1.4.6 2024-07-09 10:29:44 +02:00
offset_tracking_receive.go Check stream message is confirmed 2024-07-09 11:03:48 +02:00
offset_tracking_send.go Start stream tutorial 2 for .NET 2024-07-09 16:18:20 +02:00
README.md change close 2024-07-08 16:16:04 +02:00
receive.go Hello world for Golang stream client (#383) 2024-05-09 09:23:06 +02:00
send.go Hello world for Golang stream client (#383) 2024-05-09 09:23:06 +02:00

Go code for RabbitMQ tutorials

Here you can find Go code examples from RabbitMQ tutorials.

To successfully use the examples you will need a running RabbitMQ server with the stream plugin enabled.

See First Application With RabbitMQ Streams, Stream plugin documentation and how to preconfigure plugins.

Requirements

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

 go get -u github.com/rabbitmq/rabbitmq-stream-go-client

Code

Code examples are executed via go run:

Tutorial one: "Hello World!":

go run send.go
go run receive.go

Tutorial two: Offset Tracking:

go run offset_tracking_send.go
go run offset_tracking_receive.go

To learn more, see rabbitmq/rabbitmq-stream-go-client.