message-bus icon indicating copy to clipboard operation
message-bus copied to clipboard

修复 Unsubscribe 方法中的回调比较逻辑,确保正确关闭队列并返回适当的错误信息

Open taills opened this issue 2 months ago • 0 comments

This pull request improves the unsubscribe logic in the messageBus by making handler matching more precise and providing clearer error reporting when unsubscribing from a topic.

Error handling improvements:

  • Updated the handler comparison in func (b *messageBus) Unsubscribe to use pointer equality (Pointer()), ensuring that the correct handler is identified and unsubscribed.
  • Added specific error messages when a handler is not found for a topic or when the topic itself does not exist, making debugging easier.

taills avatar Oct 17 '25 17:10 taills