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
Negative acks in C++ client #3750
Conversation
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.
@merlimat are you planning on exposing the neg ack API for python client in a subsequent PR?
rerun java8 tests |
Yes, I have pending PRs for Python and Go that depend on this one |
* @return the consumer builder instance | ||
*/ | ||
void setNegativeAckRedeliveryDelayMs(long redeliveryDelayMillis); | ||
long getNegativeAckRedeliveryDelayMs() const; |
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.
Can you add comments for this?
* The {@code Message} to be acknowledged | ||
*/ | ||
void pulsar_consumer_negative_acknowledge(pulsar_consumer_t *consumer, pulsar_message_t *message); | ||
void pulsar_consumer_negative_acknowledge_id(pulsar_consumer_t *consumer, pulsar_message_id_t *messageId); |
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.
comments?
*/ | ||
void pulsar_configure_set_negative_ack_redelivery_delay_ms( | ||
pulsar_consumer_configuration_t *consumer_configuration, long redeliveryDelayMillis); | ||
long pulsar_configure_get_negative_ack_redelivery_delay_ms( |
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.
comments?
@@ -99,7 +100,7 @@ static void sendCallBackWithDelay(Result r, const Message& msg, std::string pref | |||
|
|||
class EncKeyReader : public CryptoKeyReader { | |||
private: | |||
void readFile(std::string fileName, std::string& fileContents) const { | |||
void readFile(std::string fileName, std::string &fileContents) const { |
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.
const std::string& fileName
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 is existing code and it was just one space reformatted by make format
.
In any case the functional change should be done in a different PR. Given this is for test, I'm not particular concerned about a string copy when loading the key file.
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.
Are we keeping https://github.com/apache/pulsar/projects/7 updated?
rerun java8 tests |
Motivation
Similar to #3703, adding support for negative Acks in C++ client (and C wrapper)