NPE in MessageConsumeCallback
-----------------------------
Key: BOOKKEEPER-144
URL: https://issues.apache.org/jira/browse/BOOKKEEPER-144
Project: Bookkeeper
Issue Type: Bug
Components: hedwig-client
Affects Versions: 4.0.0
Reporter: Sijie Guo
Currently we reuse timer to execute retry tasks. And the timer will only be
stopped when client stopped.
So in MessageConsumeRetryTask, the topicSubscriberChannel would be null due to
closeSubscription or channel disconnected. Then a NPE is thrown when
getSubscribeResponseHandler.
{code}
@Override
public void run() {
// Try to consume the message again
Channel topicSubscriberChannel =
client.getSubscriber().getChannelForTopic(topicSubscriber);
HedwigClientImpl.getResponseHandlerFromChannel(topicSubscriberChannel).getSubscribeResponseHandler()
.asyncMessageConsume(messageConsumeData.msg);
}
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira