You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "JooHyukKim (via GitHub)" <gi...@apache.org> on 2023/05/13 14:29:28 UTC

[GitHub] [pulsar] JooHyukKim opened a new pull request, #20316: [improve][client] Allow pulser-client consume create a replicated subscription

JooHyukKim opened a new pull request, #20316:
URL: https://github.com/apache/pulsar/pull/20316

   Master Issue: #11371
   Issue: #11371
   
   ### Motivation
   
   `pulsar-client consume` doesn't currently support creating replicated subscriptions.
   
   ### Modifications
   
   - Added option in `CmdConsume` for specifying the replicated parameter for subscription creation.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   *(Please pick either of the following options)*
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This change is already covered by existing tests, such as *(please describe tests)*.
   
   *(or)*
   
   This change added tests and can be verified as follows:
   
   *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Does this pull request potentially affect one of the following parts:
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   *If the box was checked, please highlight the changes*
   
   - [ ] Dependencies (add or upgrade a dependency)
   - [ ] The public API
   - [ ] The schema
   - [ ] The default values of configurations
   - [ ] The threading model
   - [ ] The binary protocol
   - [ ] The REST endpoints
   - [ ] The admin CLI options
   - [ ] The metrics
   - [ ] Anything that affects deployment
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [x] `doc-required` <!-- Your PR changes impact docs and you will update later -->
   - [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   ### Matching PR in forked repository
   
   PR in forked repository: https://github.com/JooHyukKim/pulsar/pull/4
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on pull request #20316: [improve][cli] Allow pulser-client consume create a replicated subscription

Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on PR #20316:
URL: https://github.com/apache/pulsar/pull/20316#issuecomment-1556125397

   <img width="1486" alt="image" src="https://github.com/apache/pulsar/assets/18818196/c0463694-c4fc-43a2-9d58-20b067d298b0">
   
   Already updated.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] JooHyukKim commented on pull request #20316: [improve][cli] Allow pulser-client consume create a replicated subscription

Posted by "JooHyukKim (via GitHub)" <gi...@apache.org>.
JooHyukKim commented on PR #20316:
URL: https://github.com/apache/pulsar/pull/20316#issuecomment-1553229163

   > @tisonkun The doc could be generated automatically, right?
   
   @Technoboy- Is the doc fully auto-generated? If not, please let me know so I can write documentation corresponding to this PR (and hopefully some refenrence I can refer to, if you don't mind 🙏🏼) 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] JooHyukKim commented on a diff in pull request #20316: [improve][client] Allow pulser-client consume create a replicated subscription

Posted by "JooHyukKim (via GitHub)" <gi...@apache.org>.
JooHyukKim commented on code in PR #20316:
URL: https://github.com/apache/pulsar/pull/20316#discussion_r1193516263


##########
pulsar-client-tools/src/main/java/org/apache/pulsar/client/cli/CmdConsume.java:
##########
@@ -156,7 +159,8 @@ private int consume(String topic) {
                     .subscriptionType(subscriptionType)
                     .subscriptionMode(subscriptionMode)
                     .subscriptionInitialPosition(subscriptionInitialPosition)
-                    .poolMessages(poolMessages);
+                    .poolMessages(poolMessages)
+                    .replicateSubscriptionState(replicatedSubscription);

Review Comment:
   > It's better to keep the same name
   
   Right, thanks!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on pull request #20316: [improve][cli] Allow pulser-client consume create a replicated subscription

Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on PR #20316:
URL: https://github.com/apache/pulsar/pull/20316#issuecomment-1547491520

   > The doc could be generated automatically
   
   Yes, specifically, in [this script](https://github.com/apache/pulsar-site/blob/cc349c2a440cd5da3ccbd7ecb771e93f57ec745d/tools/pytools/lib/execute/pulsar_client_clidoc_generator.py).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] Technoboy- merged pull request #20316: [improve][cli] Allow pulser-client consume create a replicated subscription

Posted by "Technoboy- (via GitHub)" <gi...@apache.org>.
Technoboy- merged PR #20316:
URL: https://github.com/apache/pulsar/pull/20316


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] JooHyukKim commented on pull request #20316: [improve][cli] Allow pulser-client consume create a replicated subscription

Posted by "JooHyukKim (via GitHub)" <gi...@apache.org>.
JooHyukKim commented on PR #20316:
URL: https://github.com/apache/pulsar/pull/20316#issuecomment-1552745071

   /pulsarbot run-failure-checks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] Technoboy- commented on pull request #20316: [improve][cli] Allow pulser-client consume create a replicated subscription

Posted by "Technoboy- (via GitHub)" <gi...@apache.org>.
Technoboy- commented on PR #20316:
URL: https://github.com/apache/pulsar/pull/20316#issuecomment-1549096946

   /pulsarbot run-failure-checks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] JooHyukKim commented on pull request #20316: [improve][cli] Allow pulser-client consume create a replicated subscription

Posted by "JooHyukKim (via GitHub)" <gi...@apache.org>.
JooHyukKim commented on PR #20316:
URL: https://github.com/apache/pulsar/pull/20316#issuecomment-1547491447

   > Thanks for your contribution! I renamed the pull request with "cli" since this only affects the CLI component
   
   Right, thank you for the revision @nicoloboschi 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] Technoboy- commented on pull request #20316: [improve][client] Allow pulser-client consume create a replicated subscription

Posted by "Technoboy- (via GitHub)" <gi...@apache.org>.
Technoboy- commented on PR #20316:
URL: https://github.com/apache/pulsar/pull/20316#issuecomment-1547380257

   @tisonkun The doc could be generated automatically, right?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] Technoboy- commented on a diff in pull request #20316: [improve][client] Allow pulser-client consume create a replicated subscription

Posted by "Technoboy- (via GitHub)" <gi...@apache.org>.
Technoboy- commented on code in PR #20316:
URL: https://github.com/apache/pulsar/pull/20316#discussion_r1193469989


##########
pulsar-client-tools/src/main/java/org/apache/pulsar/client/cli/CmdConsume.java:
##########
@@ -156,7 +159,8 @@ private int consume(String topic) {
                     .subscriptionType(subscriptionType)
                     .subscriptionMode(subscriptionMode)
                     .subscriptionInitialPosition(subscriptionInitialPosition)
-                    .poolMessages(poolMessages);
+                    .poolMessages(poolMessages)
+                    .replicateSubscriptionState(replicatedSubscription);

Review Comment:
   It's better to keep the same name



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on pull request #20316: [improve][cli] Allow pulser-client consume create a replicated subscription

Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on PR #20316:
URL: https://github.com/apache/pulsar/pull/20316#issuecomment-1556125603

   Ref - https://github.com/apache/pulsar-site/commit/2536a6e4938b0dac06d88f5b611a018afa1d7572


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org