11# GO stream client for RabbitMQ streaming queues
22---
33![ Build] ( https://github.com/rabbitmq/rabbitmq-stream-go-client/workflows/Build/badge.svg )
4- [ ![ codecov] ( https://codecov.io/gh/Gsantomaggio/go-stream-client/branch/main/graph/badge.svg?token=HZD4S71QIM )] ( https://codecov.io/gh/Gsantomaggio/go-stream-client )
54
6- Experimental client
7- for [ RabbitMQ Stream Queues] ( https://github.com/rabbitmq/rabbitmq-server/tree/master/deps/rabbitmq_stream )
5+ Experimental client for [ RabbitMQ Stream Queues] ( https://github.com/rabbitmq/rabbitmq-server/tree/master/deps/rabbitmq_stream )
86
97### Download
108---
119
1210```
13- go get -u github.com/rabbitmq/rabbitmq-stream-go-client@v0.5 -alpha
11+ go get -u github.com/rabbitmq/rabbitmq-stream-go-client@v0.6 -alpha
1412```
1513
1614### Getting started
1715---
1816
19- - Run RabbitMQ docker image with streaming:
20- ```
21- docker run -it --rm --name rabbitmq -p 5552:5552 -p 5672:5672 -p 15672:15672 \
22- -e RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="-rabbitmq_stream advertised_host localhost" \
23- pivotalrabbitmq/rabbitmq-stream
24- ```
25- - Run "getting started" example:
26- ```
27- go run examples/getting_started.go
28- ```
17+ Run RabbitMQ docker image with streaming:
18+ ```
19+ docker run -it --rm --name rabbitmq -p 5552:5552 -p 5672:5672 -p 15672:15672 \
20+ -e RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="-rabbitmq_stream advertised_host localhost" \
21+ pivotalrabbitmq/rabbitmq-stream
22+ ```
23+
24+ Run "getting started" example:
25+ ```
26+ go run examples/getting_started.go
27+ ```
28+
29+ See [ examples] ( ./examples/ ) for more use cases
2930
3031### Performance test tool is an easy way to do some test:
3132
@@ -36,25 +37,25 @@ go run perfTest/perftest.go silent
3637### API
3738---
3839
39- The API are generally composed by mandatory arguments and optional arguments the optional arguments can be set in the
40- standard go way as:
40+ The API are composed by mandatory and optional arguments.
41+ The optional be set in the standard go way as:
4142
4243``` golang
4344env , err := stream.NewEnvironment (
4445 &stream.EnvironmentOptions {
4546 ConnectionParameters : stream.Broker {
4647 Host: " localhost" ,
47- Port: 5551 ,
48+ Port: 5552 ,
4849 User: " guest" ,
4950 Password: " guest" ,
5051 },
51- MaxProducersPerClient : 3 ,
52- MaxConsumersPerClient : 3 ,
52+ MaxProducersPerClient : 1 ,
53+ MaxConsumersPerClient : 1 ,
5354 },
5455 )
5556```
5657
57- or using Builders as :
58+ or using builders ( the suggested way) :
5859
5960``` golang
6061env , err := stream.NewEnvironment (
@@ -78,10 +79,10 @@ The suggested way is to use builders.
7879---
7980
8081``` shell
81- make build
82+ make
8283```
8384
84- You need a docker image running to execute the tests in this way :
85+ You need a docker image running to execute the tests:
8586
8687```
8788 docker run -it --rm --name rabbitmq -p 5552:5552 \
0 commit comments