(fix): wrap topic with namespace when unsubscribe (#680)
diff --git a/consumer/push_consumer.go b/consumer/push_consumer.go
index 519ba36..efd373f 100644
--- a/consumer/push_consumer.go
+++ b/consumer/push_consumer.go
@@ -250,6 +250,9 @@
}
func (pc *pushConsumer) Unsubscribe(topic string) error {
+ if pc.option.Namespace != "" {
+ topic = pc.option.Namespace + "%" + topic
+ }
pc.subscriptionDataTable.Delete(topic)
retryTopic := internal.GetRetryTopic(pc.consumerGroup)
pc.subscriptionDataTable.Delete(retryTopic)