Closed master255 closed 1 month ago
How do I unsubscribe from a topic? And what does topic.Close() do? If not deleting it. Or is it a bug?
What I'm doing: ... ps, err := pubsub.NewGossipSub(ctx, h) topic, err := ps.Join(pubTitle) sub, err := topic.Subscribe() ... topic.Close() topic1, err := ps.Join(pubTitle) err == "topic already exists"
How do I unsubscribe from a topic and re-subscribe?
I forgot that I also need to do sub.Cancel() But it is not comfortable. It would be possible to cancel all subscriptions by topic.Close().
How do I unsubscribe from a topic? And what does topic.Close() do? If not deleting it. Or is it a bug?
What I'm doing: ... ps, err := pubsub.NewGossipSub(ctx, h) topic, err := ps.Join(pubTitle) sub, err := topic.Subscribe() ... topic.Close() topic1, err := ps.Join(pubTitle) err == "topic already exists"
How do I unsubscribe from a topic and re-subscribe?