Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix][client] Fix NPE when acknowledging multiple messages #22

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Mar 21, 2023

  1. [fix][client] Fix NPE when acknowledging multiple messages

    ### Motivation
    
    For a multi-topics consumer, when it acknowledges a single message, it
    will first find the owner topic from its message ID. If the owner topic
    is not subscribed by the consumer, `NotConnectedException` will be
    thrown.
    
    However, when it acknowledges multiple messages, if any of them is the
    message whose owner topic is not subscribed by the consumer, NPE will
    happen instead.
    
    ### Modifications
    
    When acknowledging multiple messages, ignore the message IDs whose owner
    topic is not subscribed. `testAckMessageInAnotherTopic` is added to
    cover this case.
    
    ### TODO
    
    There are many other places that do not check if `consumers.get` returns
    `null`, like `doReconsumeLater`, `negativeAcknowledge`, etc. This patch
    does not cover them.
    BewareMyPower committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    b217a55 View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2023

  1. Configuration menu
    Copy the full SHA
    ef9f00d View commit details
    Browse the repository at this point in the history