multiple subscriber with same subscriberId shares the topic manager

rename topicControl to topicCursor
This commit is contained in:
Chris Lu
2020-05-12 21:26:02 -07:00
parent 2f243f5b0b
commit a7959c1c48
4 changed files with 95 additions and 13 deletions

View File

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