aboutsummaryrefslogtreecommitdiff
path: root/weed/messaging/msgclient
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-05-12 21:26:02 -0700
committerChris Lu <chris.lu@gmail.com>2020-05-12 21:26:02 -0700
commita7959c1c488f5662dc2f867e0dbeeebf3899bbe3 (patch)
tree0716f575b29cc41f9e433f355052c092895beeb6 /weed/messaging/msgclient
parent2f243f5b0b7c037eb13ae14f58bd1f8608fbc4d0 (diff)
downloadseaweedfs-a7959c1c488f5662dc2f867e0dbeeebf3899bbe3.tar.xz
seaweedfs-a7959c1c488f5662dc2f867e0dbeeebf3899bbe3.zip
multiple subscriber with same subscriberId shares the topic manager
rename topicControl to topicCursor
Diffstat (limited to 'weed/messaging/msgclient')
-rw-r--r--weed/messaging/msgclient/sub_chan.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/messaging/msgclient/sub_chan.go b/weed/messaging/msgclient/sub_chan.go
index ed25a850c..5465c5913 100644
--- a/weed/messaging/msgclient/sub_chan.go
+++ b/weed/messaging/msgclient/sub_chan.go
@@ -17,7 +17,7 @@ type SubChannel struct {
md5hash hash.Hash
}
-func (mc *MessagingClient) NewSubChannel(chanName string) (*SubChannel, error) {
+func (mc *MessagingClient) NewSubChannel(subscriberId, chanName string) (*SubChannel, error) {
tp := broker.TopicPartition{
Namespace: "chan",
Topic: chanName,
@@ -27,7 +27,7 @@ func (mc *MessagingClient) NewSubChannel(chanName string) (*SubChannel, error) {
if err != nil {
return nil, err
}
- sc, err := setupSubscriberClient(grpcConnection, "", "chan", chanName, 0, time.Unix(0, 0))
+ sc, err := setupSubscriberClient(grpcConnection, subscriberId, "chan", chanName, 0, time.Unix(0, 0))
if err != nil {
return nil, err
}