This commit is contained in:
Chris Lu
2020-06-05 15:27:10 -07:00
parent 03c2f03509
commit 45a9d852d3
11 changed files with 25 additions and 24 deletions

View File

@@ -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)

View File

@@ -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)