Skip to content

Commit de657f5

Browse files
authored
(fix): wrap topic with namespace when unsubscribe (apache#680)
1 parent 817ad27 commit de657f5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

consumer/push_consumer.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,9 @@ func (pc *pushConsumer) Subscribe(topic string, selector MessageSelector,
250250
}
251251

252252
func (pc *pushConsumer) Unsubscribe(topic string) error {
253+
if pc.option.Namespace != "" {
254+
topic = pc.option.Namespace + "%" + topic
255+
}
253256
pc.subscriptionDataTable.Delete(topic)
254257
retryTopic := internal.GetRetryTopic(pc.consumerGroup)
255258
pc.subscriptionDataTable.Delete(retryTopic)

0 commit comments

Comments
 (0)