[ https://issues.apache.org/jira/browse/BOOKKEEPER-410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sijie Guo resolved BOOKKEEPER-410. ---------------------------------- Resolution: Won't Fix {code} private void doAsyncCloseSubscription(final ByteString topic, final ByteString subscriberId, final Callback<ResponseBody> callback, final Object context) { TopicSubscriber topicSubscriber = new TopicSubscriber(topic, subscriberId); logger.debug("Stopping delivery for {} before closing subscription.", topicSubscriber); // We only stop delivery here not in channel manager // Because channelManager#asyncCloseSubscription will called // when subscription channel disconnected to clear local subscription try { channelManager.stopDelivery(topicSubscriber); } catch (ClientNotSubscribedException cnse) { // it is OK to ignore the exception when closing subscription } logger.debug("Closing subscription asynchronously for {}.", topicSubscriber); channelManager.asyncCloseSubscription(topicSubscriber, callback, context); } {code} Checked the code. we already remove message handler when closing subscription. so marked it as won't fix. > Hedwig client should remove message handler while closing subscription > ---------------------------------------------------------------------- > > Key: BOOKKEEPER-410 > URL: https://issues.apache.org/jira/browse/BOOKKEEPER-410 > Project: Bookkeeper > Issue Type: Bug > Components: hedwig-client, hedwig-server > Affects Versions: 4.2.0 > Reporter: Aniruddha > Fix For: 4.2.0 > > > The hedwig java client does not remove a message handler for the topic (by > calling stopDelivery) when we close a subscription channel. Because of this, > when a subscription request goes through with another message handler, the > subscription goes fine, but we can't start delivery. The only reason for > keeping the message handler is to support restartDelivery. We should change > the way restart delivery is handled by storing the existing message handler > in the SubscribeReconnectCallback and forcing the subscribe handler to use it > when we restart delivery. > This manifests as a bug in the region manager. When a topic moves from one > hub to another and then returns to this hub, because the client still has a > dangling MessageHandler, none of the subscriptions succeed because they can't > start delivery. As an additional check, the region manager's client should > not start delivery for a topic if there is an existing message handler. Any > thoughts? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira