1
1
# GO stream client for RabbitMQ streaming queues
2
2
---
3
3
![ 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 )
5
4
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 )
8
6
9
7
### Download
10
8
---
11
9
12
10
```
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
14
12
```
15
13
16
14
### Getting started
17
15
---
18
16
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
29
30
30
31
### Performance test tool is an easy way to do some test:
31
32
@@ -36,25 +37,25 @@ go run perfTest/perftest.go silent
36
37
### API
37
38
---
38
39
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:
41
42
42
43
``` golang
43
44
env , err := stream.NewEnvironment (
44
45
&stream.EnvironmentOptions {
45
46
ConnectionParameters : stream.Broker {
46
47
Host: " localhost" ,
47
- Port: 5551 ,
48
+ Port: 5552 ,
48
49
User: " guest" ,
49
50
Password: " guest" ,
50
51
},
51
- MaxProducersPerClient : 3 ,
52
- MaxConsumersPerClient : 3 ,
52
+ MaxProducersPerClient : 1 ,
53
+ MaxConsumersPerClient : 1 ,
53
54
},
54
55
)
55
56
```
56
57
57
- or using Builders as :
58
+ or using builders ( the suggested way) :
58
59
59
60
``` golang
60
61
env , err := stream.NewEnvironment (
@@ -78,10 +79,10 @@ The suggested way is to use builders.
78
79
---
79
80
80
81
``` shell
81
- make build
82
+ make
82
83
```
83
84
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:
85
86
86
87
```
87
88
docker run -it --rm --name rabbitmq -p 5552:5552 \
0 commit comments