Uploaded image for project: 'Bookkeeper'
  1. Bookkeeper
  2. BOOKKEEPER-144

NPE in MessageConsumeCallback

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 4.0.0
    • Fix Version/s: None
    • Component/s: hedwig-client
    • Labels:
      None

      Description

      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.

              @Override
              public void run() {
                  // Try to consume the message again
                  Channel topicSubscriberChannel = client.getSubscriber().getChannelForTopic(topicSubscriber);
                  HedwigClientImpl.getResponseHandlerFromChannel(topicSubscriberChannel).getSubscribeResponseHandler()
                  .asyncMessageConsume(messageConsumeData.msg);
              }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                hustlmsp Sijie Guo

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Issue deployment