aboutsummaryrefslogtreecommitdiff
path: root/weed/messaging/msgclient
diff options
context:
space:
mode:
Diffstat (limited to 'weed/messaging/msgclient')
-rw-r--r--weed/messaging/msgclient/publisher.go2
-rw-r--r--weed/messaging/msgclient/subscriber.go6
2 files changed, 4 insertions, 4 deletions
diff --git a/weed/messaging/msgclient/publisher.go b/weed/messaging/msgclient/publisher.go
index b0fc5afbf..1aa483ff8 100644
--- a/weed/messaging/msgclient/publisher.go
+++ b/weed/messaging/msgclient/publisher.go
@@ -26,7 +26,7 @@ func (mc *MessagingClient) NewPublisher(publisherId, namespace, topic string) (*
for i := 0; i < int(topicConfiguration.PartitionCount); i++ {
tp := broker.TopicPartition{
Namespace: namespace,
- Topic: topic,
+ Topic: topic,
Partition: int32(i),
}
grpcClientConn, err := mc.findBroker(tp)
diff --git a/weed/messaging/msgclient/subscriber.go b/weed/messaging/msgclient/subscriber.go
index caa795626..6c7dc1ab7 100644
--- a/weed/messaging/msgclient/subscriber.go
+++ b/weed/messaging/msgclient/subscriber.go
@@ -3,8 +3,8 @@ package msgclient
import (
"context"
"io"
- "time"
"sync"
+ "time"
"github.com/chrislusf/seaweedfs/weed/messaging/broker"
"github.com/chrislusf/seaweedfs/weed/pb/messaging_pb"
@@ -26,12 +26,12 @@ func (mc *MessagingClient) NewSubscriber(subscriberId, namespace, topic string,
subscriberCancels := make([]context.CancelFunc, topicConfiguration.PartitionCount)
for i := 0; i < int(topicConfiguration.PartitionCount); i++ {
- if partitionId>=0 && i != partitionId {
+ if partitionId >= 0 && i != partitionId {
continue
}
tp := broker.TopicPartition{
Namespace: namespace,
- Topic: topic,
+ Topic: topic,
Partition: int32(i),
}
grpcClientConn, err := mc.findBroker(tp)