Skip to content

Commit 72ed104

Browse files
committed
version 0.6-alpha
1 parent 8423b6e commit 72ed104

File tree

4 files changed

+25
-75
lines changed

4 files changed

+25
-75
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ vet
2121
.DS_Store
2222
perfTest/
2323
.vagrant/
24+
local/

README.md

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,32 @@
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
4344
env, 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
6061
env, 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 \

pkg/stream/consumer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ func (consumer *Consumer) Commit() error {
157157
length := 2 + 2 + 2 + len(consumer.options.ConsumerName) + 2 +
158158
len(consumer.options.streamName) + 8
159159
var b = bytes.NewBuffer(make([]byte, 0, length+4))
160-
writeProtocolHeader(b, length, commandCommitOffset) // correlation ID not used yet, may be used if commit offset has a confirm
160+
writeProtocolHeader(b, length, commandCommitOffset)
161161

162162
writeString(b, consumer.options.ConsumerName)
163163
writeString(b, consumer.options.streamName)

remove_all_queues.py

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)