Skip to content

Commit 9d44da9

Browse files
authored
Correcting that binary data cannot be received under cluster status (#185)
Correcting that binary data cannot be received under cluster status
1 parent d6b3c4e commit 9d44da9

9 files changed

+1479
-955
lines changed

go.mod

+12-11
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,29 @@ module github.com/DrmagicE/gmqtt
33
go 1.14
44

55
require (
6-
github.com/golang/mock v1.4.4
7-
github.com/golang/protobuf v1.4.2
6+
github.com/golang/glog v1.0.0 // indirect
7+
github.com/golang/mock v1.6.0
8+
github.com/golang/protobuf v1.5.2
89
github.com/gomodule/redigo v1.8.2
9-
github.com/google/uuid v1.1.2
10+
github.com/google/uuid v1.3.0
1011
github.com/gorilla/websocket v1.4.2
1112
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0
1213
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
1314
github.com/grpc-ecosystem/grpc-gateway v1.16.0
15+
github.com/hashicorp/go-immutable-radix v1.0.0 // indirect
1416
github.com/hashicorp/go-sockaddr v1.0.0
1517
github.com/hashicorp/logutils v1.0.0
1618
github.com/hashicorp/serf v0.9.5
1719
github.com/iancoleman/strcase v0.1.2
1820
github.com/pkg/errors v0.8.1
1921
github.com/prometheus/client_golang v1.4.0
2022
github.com/spf13/cobra v1.0.0
21-
github.com/stretchr/testify v1.6.1
23+
github.com/stretchr/testify v1.7.0
2224
go.uber.org/zap v1.13.0
23-
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
24-
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd
25-
golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc // indirect
26-
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013
27-
google.golang.org/grpc v1.34.0
28-
google.golang.org/protobuf v1.25.0
29-
gopkg.in/yaml.v2 v2.2.5
25+
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
26+
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10
27+
google.golang.org/genproto v0.0.0-20221201204527-e3fa12d562f3
28+
google.golang.org/grpc v1.50.1
29+
google.golang.org/protobuf v1.28.1
30+
gopkg.in/yaml.v2 v2.4.0
3031
)

go.sum

+902
Large diffs are not rendered by default.

plugin/federation/federation.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ func (f *Federation) Name() string {
581581
func messageToEvent(msg *gmqtt.Message) *Message {
582582
eventMsg := &Message{
583583
TopicName: msg.Topic,
584-
Payload: string(msg.Payload),
584+
Payload: msg.Payload,
585585
Qos: uint32(msg.QoS),
586586
Retained: msg.Retained,
587587
ContentType: msg.ContentType,
@@ -607,7 +607,7 @@ func eventToMessage(event *Message) *gmqtt.Message {
607607
QoS: byte(event.Qos),
608608
Retained: event.Retained,
609609
Topic: event.TopicName,
610-
Payload: []byte(event.Payload),
610+
Payload: event.Payload,
611611
ContentType: event.ContentType,
612612
CorrelationData: []byte(event.CorrelationData),
613613
MessageExpiry: event.MessageExpiry,

0 commit comments

Comments
 (0)