-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Not allow use acknowledgeCumulative on Key_shared subscription. #5339
Not allow use acknowledgeCumulative on Key_shared subscription. #5339
Conversation
run integration tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Also please add the same for C++ client
Message<Integer> message = consumer.receive(); | ||
if (i == 9) { | ||
try { | ||
consumer.acknowledgeCumulative(message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add fail("should have failed")
after calling ack, to verify the call is indeed throwing exception
if (i == 9) { | ||
try { | ||
consumer.acknowledgeCumulative(message); | ||
} catch (PulsarClientException e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be simplified into } catch (PulsarClientException.InvalidConfigurationException e) {
run Integration Tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
…he#5339) * Not allow use acknowledgeCumulative on Key_shared subscription. * fix comments * C++ Client add acknowledgeCumulative not allowed check.
Motivation
Key_Shared subscription is a enhancement of shared subscription, we should avoid use acknowledgeCumulative on Key_shared subscription
Modifications
Add allow acknowledgeCumulative check for Key_shared subscription
Verifying this change
Add new unit test.
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation