You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/11/16 09:45:58 UTC

[GitHub] [pulsar] lxdzjdq opened a new pull request #12831: [CAPI] Support getting/setting replicateSubscriptionState perameter for consumers

lxdzjdq opened a new pull request #12831:
URL: https://github.com/apache/pulsar/pull/12831


   [CAPI] Support getting/setting replicateSubscriptionState perameter for consumers
   
   ### Motivation
   We would like to make it possible for C API based client library to
   get/set the replicateSubscriptionState perameter for consumers.
   
   ### Modifications
   Add methods to set/get replicateSubscriptionState perameter for
   consumers.


-- 
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] Anonymitaet commented on a change in pull request #12831: [CAPI] Support getting/setting replicateSubscriptionState perameter for consumers

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on a change in pull request #12831:
URL: https://github.com/apache/pulsar/pull/12831#discussion_r750868543



##########
File path: pulsar-client-cpp/include/pulsar/c/consumer_configuration.h
##########
@@ -281,6 +281,12 @@ PULSAR_PUBLIC void pulsar_consumer_configuration_set_priority_level(
 PULSAR_PUBLIC int pulsar_consumer_configuration_get_priority_level(
     pulsar_consumer_configuration_t *consumer_configuration);
 
+PULSAR_PUBLIC int pulsar_consumer_is_replicate_subscription_state_enabled(
+    pulsar_consumer_configuration_t *consumer_configuration);

Review comment:
       BTW, there are some issues in C, welcome to make contributes to [this issue](https://github.com/apache/pulsar/issues/12843), 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] lxdzjdq commented on pull request #12831: [CAPI] Support getting/setting replicateSubscriptionState perameter for consumers

Posted by GitBox <gi...@apache.org>.
lxdzjdq commented on pull request #12831:
URL: https://github.com/apache/pulsar/pull/12831#issuecomment-975193938


   Hi, Anonymitaet;
   
   Thank you very much for your comment. All comments have been resolved.


-- 
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] lxdzjdq edited a comment on pull request #12831: [CAPI] Support getting/setting replicateSubscriptionState perameter for consumers

Posted by GitBox <gi...@apache.org>.
lxdzjdq edited a comment on pull request #12831:
URL: https://github.com/apache/pulsar/pull/12831#issuecomment-984232226


   done


-- 
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] Anonymitaet commented on pull request #12831: [CAPI] Support getting/setting replicateSubscriptionState perameter for consumers

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on pull request #12831:
URL: https://github.com/apache/pulsar/pull/12831#issuecomment-975201639


   @lxdzjdq I've labeled this PR w/ `doc` since this content is a kind of "user guide". 
   ![image](https://user-images.githubusercontent.com/50226895/142820464-28fa25d7-a5b8-456a-8b18-e8acc1e65342.png)
   


-- 
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] github-actions[bot] commented on pull request #12831: [CAPI] Support getting/setting replicateSubscriptionState perameter for consumers

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #12831:
URL: https://github.com/apache/pulsar/pull/12831#issuecomment-970097809


   @lxdzjdq:Thanks for your contribution. For this PR, do we need to update docs?
   (The [PR template contains info about doc](https://github.com/apache/pulsar/blob/master/.github/PULL_REQUEST_TEMPLATE.md#documentation), which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? 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] github-actions[bot] commented on pull request #12831: [CAPI] Support getting/setting replicateSubscriptionState perameter for consumers

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #12831:
URL: https://github.com/apache/pulsar/pull/12831#issuecomment-1052937047


   The pr had no activity for 30 days, mark with Stale label.


-- 
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] Anonymitaet commented on pull request #12831: [CAPI] Support getting/setting replicateSubscriptionState perameter for consumers

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on pull request #12831:
URL: https://github.com/apache/pulsar/pull/12831#issuecomment-971146085


   @lxdzjdq when submitting a PR, can you help provide a doc label (tick the box) in the [PR template which contains info about doc](https://github.com/apache/pulsar/blob/master/.github/PULL_REQUEST_TEMPLATE.md#documentation)? This helps others know more about the changes. Thanks
   <img width="682" alt="Documentation" src="https://user-images.githubusercontent.com/50226895/142128655-cbccf9da-6fb9-44c4-b6e4-edfecdbd5f10.png">
   


-- 
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] BewareMyPower commented on pull request #12831: [CAPI] Support getting/setting replicateSubscriptionState perameter for consumers

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on pull request #12831:
URL: https://github.com/apache/pulsar/pull/12831#issuecomment-976306635


   It looks like the code format is still wrong, please run `make format` or `./docker-format.sh` to reformat your code.
   
   Or you can just apply the following patch.
   
   ```diff
   diff --git a/pulsar-client-cpp/include/pulsar/c/consumer_configuration.h b/pulsar-client-cpp/include/pulsar/c/consumer_configuration.h
   index 900f21be79c..58c6e189806 100644
   --- a/pulsar-client-cpp/include/pulsar/c/consumer_configuration.h
   +++ b/pulsar-client-cpp/include/pulsar/c/consumer_configuration.h
   @@ -291,10 +291,11 @@ PULSAR_PUBLIC int pulsar_consumer_is_replicate_subscription_state_enabled(
        pulsar_consumer_configuration_t *consumer_configuration);
    
    /**
   - * Enable or disable replicated subscription 
   + * Enable or disable replicated subscription
     *
     * @param consumer_configuration the consumer configuration object
   - * @param enabled int parameter. 0 means disabling replicated subscriptions. 1 means enabling replicated subscriptions.
   + * @param enabled int parameter. 0 means disabling replicated subscriptions. 1 means enabling replicated
   + * subscriptions.
     */
    PULSAR_PUBLIC void pulsar_consumer_set_replicate_subscription_state_enabled(
        pulsar_consumer_configuration_t *consumer_configuration, int enabled);
   @@ -316,4 +317,3 @@ PULSAR_PUBLIC void pulsar_consumer_set_replicate_subscription_state_enabled(
    #ifdef __cplusplus
    }
    #endif
   -
   ```


-- 
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] lxdzjdq commented on pull request #12831: [CAPI] Support getting/setting replicateSubscriptionState perameter for consumers

Posted by GitBox <gi...@apache.org>.
lxdzjdq commented on pull request #12831:
URL: https://github.com/apache/pulsar/pull/12831#issuecomment-984232226






-- 
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] BewareMyPower commented on pull request #12831: [CAPI] Support getting/setting replicateSubscriptionState perameter for consumers

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on pull request #12831:
URL: https://github.com/apache/pulsar/pull/12831#issuecomment-975038385


   Could you address the comments and reformat the code?


-- 
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] lxdzjdq removed a comment on pull request #12831: [CAPI] Support getting/setting replicateSubscriptionState perameter for consumers

Posted by GitBox <gi...@apache.org>.
lxdzjdq removed a comment on pull request #12831:
URL: https://github.com/apache/pulsar/pull/12831#issuecomment-984232348


   done


-- 
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] lxdzjdq closed pull request #12831: [CAPI] Support getting/setting replicateSubscriptionState perameter for consumers

Posted by GitBox <gi...@apache.org>.
lxdzjdq closed pull request #12831:
URL: https://github.com/apache/pulsar/pull/12831


   


-- 
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] Anonymitaet commented on a change in pull request #12831: [CAPI] Support getting/setting replicateSubscriptionState perameter for consumers

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on a change in pull request #12831:
URL: https://github.com/apache/pulsar/pull/12831#discussion_r750851825



##########
File path: pulsar-client-cpp/include/pulsar/c/consumer_configuration.h
##########
@@ -281,6 +281,12 @@ PULSAR_PUBLIC void pulsar_consumer_configuration_set_priority_level(
 PULSAR_PUBLIC int pulsar_consumer_configuration_get_priority_level(
     pulsar_consumer_configuration_t *consumer_configuration);
 
+PULSAR_PUBLIC int pulsar_consumer_is_replicate_subscription_state_enabled(
+    pulsar_consumer_configuration_t *consumer_configuration);

Review comment:
       Can you add explanations (docs) for your code change?
   
   Example:
   ![image](https://user-images.githubusercontent.com/50226895/142128215-c1602334-4719-4c39-b6af-a5581c2f1822.png)
   




-- 
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] Anonymitaet commented on a change in pull request #12831: [CAPI] Support getting/setting replicateSubscriptionState perameter for consumers

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on a change in pull request #12831:
URL: https://github.com/apache/pulsar/pull/12831#discussion_r753913369



##########
File path: pulsar-client-cpp/include/pulsar/c/consumer_configuration.h
##########
@@ -281,6 +281,24 @@ PULSAR_PUBLIC void pulsar_consumer_configuration_set_priority_level(
 PULSAR_PUBLIC int pulsar_consumer_configuration_get_priority_level(
     pulsar_consumer_configuration_t *consumer_configuration);
 
+/**
+ * Check whether the replicated subscription is enabled.
+ *
+ * @param consumer_configuration the consumer conf object

Review comment:
       ```suggestion
    * @param consumer_configuration the consumer configuration object
   ```

##########
File path: pulsar-client-cpp/include/pulsar/c/consumer_configuration.h
##########
@@ -281,6 +281,24 @@ PULSAR_PUBLIC void pulsar_consumer_configuration_set_priority_level(
 PULSAR_PUBLIC int pulsar_consumer_configuration_get_priority_level(
     pulsar_consumer_configuration_t *consumer_configuration);
 
+/**
+ * Check whether the replicated subscription is enabled.
+ *
+ * @param consumer_configuration the consumer conf object
+ * @return whether the replicated subscription is enabled.
+ */
+PULSAR_PUBLIC int pulsar_consumer_is_replicate_subscription_state_enabled(
+    pulsar_consumer_configuration_t *consumer_configuration);
+
+/**
+ * Enable/disable replicated subscription 

Review comment:
       ```suggestion
    * Enable or disable replicated subscription 
   ```

##########
File path: pulsar-client-cpp/include/pulsar/c/consumer_configuration.h
##########
@@ -281,6 +281,24 @@ PULSAR_PUBLIC void pulsar_consumer_configuration_set_priority_level(
 PULSAR_PUBLIC int pulsar_consumer_configuration_get_priority_level(
     pulsar_consumer_configuration_t *consumer_configuration);
 
+/**
+ * Check whether the replicated subscription is enabled.
+ *
+ * @param consumer_configuration the consumer conf object
+ * @return whether the replicated subscription is enabled.
+ */
+PULSAR_PUBLIC int pulsar_consumer_is_replicate_subscription_state_enabled(
+    pulsar_consumer_configuration_t *consumer_configuration);
+
+/**
+ * Enable/disable replicated subscription 
+ *
+ * @param consumer_configuration the consumer conf object

Review comment:
       same

##########
File path: pulsar-client-cpp/include/pulsar/c/consumer_configuration.h
##########
@@ -281,6 +281,24 @@ PULSAR_PUBLIC void pulsar_consumer_configuration_set_priority_level(
 PULSAR_PUBLIC int pulsar_consumer_configuration_get_priority_level(
     pulsar_consumer_configuration_t *consumer_configuration);
 
+/**
+ * Check whether the replicated subscription is enabled.
+ *
+ * @param consumer_configuration the consumer conf object
+ * @return whether the replicated subscription is enabled.
+ */
+PULSAR_PUBLIC int pulsar_consumer_is_replicate_subscription_state_enabled(
+    pulsar_consumer_configuration_t *consumer_configuration);
+
+/**
+ * Enable/disable replicated subscription 
+ *
+ * @param consumer_configuration the consumer conf object
+ * @param enabled A value of type int, 0: disable; 1: enable

Review comment:
       ```suggestion
    * @param enabled A value of type int. 0 means disabling replicated subscriptions. 1 means enabling replicated subscriptions.
   ```

##########
File path: pulsar-client-cpp/include/pulsar/c/consumer_configuration.h
##########
@@ -281,6 +281,24 @@ PULSAR_PUBLIC void pulsar_consumer_configuration_set_priority_level(
 PULSAR_PUBLIC int pulsar_consumer_configuration_get_priority_level(
     pulsar_consumer_configuration_t *consumer_configuration);
 
+/**
+ * Check whether the replicated subscription is enabled.
+ *
+ * @param consumer_configuration the consumer conf object
+ * @return whether the replicated subscription is enabled.
+ */
+PULSAR_PUBLIC int pulsar_consumer_is_replicate_subscription_state_enabled(
+    pulsar_consumer_configuration_t *consumer_configuration);
+
+/**
+ * Enable/disable replicated subscription 
+ *
+ * @param consumer_configuration the consumer conf object
+ * @param enabled A value of type int, 0: disable; 1: enable

Review comment:
       what's the meaning of "A value"?




-- 
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