Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Won't Fix
-
None
-
None
-
None
Description
In HedwigSubscriber, calling unsubscribe():
- calls closeSubscription() synchronously, which removes the subscriber's channel for the topic
- asyncSubUnsub uses the publisher's channel to send the UNSUBSCRIBE message, which bypasses the missing subscriber channel
- (later, when the UNSUBSCRIBE response arrives) UnsubscribeResponseHandler.handleUnsubscribeResponse calls closeSubscription() again, which fails to find the previously closed channel with a warning:
WARN - [New I/O client worker #2-2:HedwigSubscriber@759] - Trying to close a subscription when we don't have a subscribe channel cached for topic
In the case described above, the double-close is harmless. But it's easy to imagine another situation where a client re-subscribes after unsubscribing, and the async closeSubscription described above causes their new channel to be closed.