Skip to content

Conversation

@massakam
Copy link
Contributor

@massakam massakam commented Mar 12, 2024

Motivation

The Java client consumer has a setting called startPaused. If this is set to true, the created consumer will not fetch messages from the broker until resume is called. Currently, this setting does not seem to exist in the C++ client consumer, so I will add it.

Verifying this change

  • Make sure that the change passes the CI checks.

Documentation

  • doc-not-needed

@massakam massakam added this to the 3.5.0 milestone Mar 12, 2024
@massakam massakam self-assigned this Mar 12, 2024
@BewareMyPower
Copy link
Contributor

The 3.5.0 candidate 2 is in vote, do you want to include this PR in this release? Or is it acceptable to delay it to 3.6.0?

@massakam massakam modified the milestones: 3.5.0, 3.6.0 Mar 13, 2024
@massakam
Copy link
Contributor Author

@BewareMyPower Oh, I missed it. Changed the milestone to 3.6.0.

std::this_thread::sleep_for(std::chrono::microseconds(2 * 1000 * 1000));
ASSERT_EQ(globalCount, 0);
consumer.resumeMessageListener();
std::this_thread::sleep_for(std::chrono::microseconds(2 * 1000 * 1000));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use waitUntil to avoid sleeping too long, see examples in tests/ProducerTest.cc

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced the second sleep with waitUntil. Replacing the first one would be difficult.

@BewareMyPower BewareMyPower added the enhancement New feature or request label Mar 14, 2024
@BewareMyPower BewareMyPower merged commit 234a55d into apache:main Mar 14, 2024
@massakam massakam deleted the start-paused branch March 15, 2024 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants