aboutsummaryrefslogtreecommitdiff
path: root/weed/messaging/msgclient/publisher.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/messaging/msgclient/publisher.go')
-rw-r--r--weed/messaging/msgclient/publisher.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/weed/messaging/msgclient/publisher.go b/weed/messaging/msgclient/publisher.go
index b0459494b..08f1d278a 100644
--- a/weed/messaging/msgclient/publisher.go
+++ b/weed/messaging/msgclient/publisher.go
@@ -4,9 +4,9 @@ import (
"context"
"github.com/OneOfOne/xxhash"
+ "google.golang.org/grpc"
"github.com/chrislusf/seaweedfs/weed/messaging/broker"
- "github.com/chrislusf/seaweedfs/weed/pb"
"github.com/chrislusf/seaweedfs/weed/pb/messaging_pb"
)
@@ -16,7 +16,7 @@ type Publisher struct {
messageCount uint64
publisherId string
}
-
+/*
func (mc *MessagingClient) NewPublisher(publisherId, namespace, topic string) (*Publisher, error) {
// read topic configuration
topicConfiguration := &messaging_pb.TopicConfiguration{
@@ -24,7 +24,11 @@ func (mc *MessagingClient) NewPublisher(publisherId, namespace, topic string) (*
}
publishClients := make([]messaging_pb.SeaweedMessaging_PublishClient, topicConfiguration.PartitionCount)
for i := 0; i < int(topicConfiguration.PartitionCount); i++ {
- client, err := mc.setupPublisherClient(namespace, topic, int32(i))
+ client, err := setupPublisherClient(broker.TopicPartition{
+ Namespace: namespace,
+ Topic: topic,
+ Partition: int32(i),
+ })
if err != nil {
return nil, err
}
@@ -35,6 +39,7 @@ func (mc *MessagingClient) NewPublisher(publisherId, namespace, topic string) (*
topicConfiguration: topicConfiguration,
}, nil
}
+*/
func setupPublisherClient(grpcConnection *grpc.ClientConn, tp broker.TopicPartition) (messaging_pb.SeaweedMessaging_PublishClient, error) {