Repository navigation
[Issue 11846][Java client] Create a consumer in the paused state - #11974
Conversation
|
Hi @codelipenghui, I think this change should address the issue #11846 we discussed - could you review? |
Anonymitaet
left a comment
There was a problem hiding this comment.
Thanks for your contribution. I’ve left some comments, PTAL.
|
@eolivelli, @codelipenghui, @BewareMyPower, @sijie, @hangc0276, @merlimat - PTAL, thanks. |
|
Bump on this PR! @eolivelli, @codelipenghui, @BewareMyPower, @sijie, @hangc0276, @merlimat - PTAL |
|
LGTM. But I'm wondering if it needs a PIP because it's a new feature for Pulsar client while it's very simple. Please help confirm it. @merlimat @codelipenghui |
michaeljmarshall
left a comment
There was a problem hiding this comment.
@zwalsh-toast - sorry this PR has been stale for so long. I just re-reviewed the PR and have a some questions for you. Please see my comments.
@BewareMyPower - while this PR updates the public ConsumerBuilder API, it is a very small and thoughtful extension of it, so I personally don't think it deserves a PIP.
Co-authored-by: Anonymitaet <[email protected]>
7cebf69 to
f36d33c
Compare
…che#11974) * Set paused() in ConsumerBuilder() * Test that consumer is paused * Remove todo * Use present tense in paused Javadoc Co-authored-by: Anonymitaet <[email protected]> * Update method name and Javadoc * ConsumerBuilderImpl test Co-authored-by: Anonymitaet <[email protected]>
Fixes #11846
Motivation
Control the message flow when creating a consumer. Before this change, consumers would immediately send flow permits to the broker upon
.subscribe(). Now, consumers can connect (which validates configuration/authentication) immediately, but wait to process messages until.resume()is called.Modifications
private boolean startPausedtoConsumerConfigurationDatapausedin theConsumerImplVerifying this change
(Please pick either of the following options)
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
If
yeswas chosen, please highlight the changespaused(boolean)on theConsumerBuilderDocumentation
Check the box below and label this PR (if you have committer privilege).
Need to update docs?
doc-required
(If you need help on updating docs, create a doc issue)
no-need-doc
This PR adds Javadoc to the new ConsumerBuilder option. There's no existing documentation I can find on the site for
pausedso this seems sufficient.doc
(If this PR contains doc changes)