You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by "Sijie Guo (Created) (JIRA)" <ji...@apache.org> on 2011/12/15 08:54:33 UTC

[jira] [Created] (BOOKKEEPER-144) NPE in MessageConsumeCallback

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

        

[jira] [Resolved] (BOOKKEEPER-144) NPE in MessageConsumeCallback

Posted by "Sijie Guo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sijie Guo resolved BOOKKEEPER-144.
----------------------------------

    Resolution: Duplicate
    
> 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