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 2020/08/28 03:04:56 UTC

[GitHub] [pulsar] MarvinCai opened a new pull request #7917: Update document for how to pick active consumer for failover subscription.

MarvinCai opened a new pull request #7917:
URL: https://github.com/apache/pulsar/pull/7917


   Update document to specify how active consumer is picked for partitioned and non-partitoned topic for failover subscription mode. The change was push in 2.4.2 but document has not been updated.
   
   Fixes #7864
   


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

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



[GitHub] [pulsar] MarvinCai commented on a change in pull request #7917: [Issue 7864][docs]Update document for how to pick active consumer for failover subscription.

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



##########
File path: site2/docs/concepts-messaging.md
##########
@@ -254,9 +254,11 @@ In the diagram below, only **Consumer A-0** is allowed to consume messages.
 
 ### Failover
 
-In *failover* mode, multiple consumers can attach to the same subscription. In failover mode, the broker selects the master consumer based on the priority level and the lexicographical sorting of a consumer name. If two consumers have an identical priority level, the broker selects the master consumer based on the lexicographical sorting. If these two consumers have different priority levels, the broker selects the consumer with a higher priority level as the master consumer. The master consumer is initially the only one receiving messages. When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line.
+In *failover* mode, multiple consumers can attach to the same subscription. A master consumer will be picked for non-partitioned topic or each partition of partitioned topic. The master consumer is the only one receiving messages. When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line. 

Review comment:
       I'll keep the non-partitioned topic or each partition of partitioned topic part as I think this detail is useful to readers.




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

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



[GitHub] [pulsar] MarvinCai commented on a change in pull request #7917: [Issue 7864][docs]Update document for how to pick active consumer for failover subscription.

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



##########
File path: site2/docs/concepts-messaging.md
##########
@@ -254,9 +254,11 @@ In the diagram below, only **Consumer A-0** is allowed to consume messages.
 
 ### Failover
 
-In *failover* mode, multiple consumers can attach to the same subscription. In failover mode, the broker selects the master consumer based on the priority level and the lexicographical sorting of a consumer name. If two consumers have an identical priority level, the broker selects the master consumer based on the lexicographical sorting. If these two consumers have different priority levels, the broker selects the consumer with a higher priority level as the master consumer. The master consumer is initially the only one receiving messages. When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line.
+In *failover* mode, multiple consumers can attach to the same subscription. A master consumer will be picked for non-partitioned topic or each partition of partitioned topic. The master consumer is the only one receiving messages. When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line. 

Review comment:
       cool, 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.

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



[GitHub] [pulsar] Jennifer88huang commented on a change in pull request #7917: [Issue 7864][docs]Update document for how to pick active consumer for failover subscription.

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



##########
File path: site2/docs/concepts-messaging.md
##########
@@ -254,9 +254,11 @@ In the diagram below, only **Consumer A-0** is allowed to consume messages.
 
 ### Failover
 
-In *failover* mode, multiple consumers can attach to the same subscription. In failover mode, the broker selects the master consumer based on the priority level and the lexicographical sorting of a consumer name. If two consumers have an identical priority level, the broker selects the master consumer based on the lexicographical sorting. If these two consumers have different priority levels, the broker selects the consumer with a higher priority level as the master consumer. The master consumer is initially the only one receiving messages. When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line.
+In *failover* mode, multiple consumers can attach to the same subscription. A master consumer will be picked for non-partitioned topic or each partition of partitioned topic. The master consumer is the only one receiving messages. When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line. 

Review comment:
       In *failover* mode, multiple consumers can attach to the same subscription. A master consumer is picked for topics and receives messages. When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line. 




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

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



[GitHub] [pulsar] codelipenghui merged pull request #7917: [Issue 7864][docs]Update document for how to pick active consumer for failover subscription.

Posted by GitBox <gi...@apache.org>.
codelipenghui merged pull request #7917:
URL: https://github.com/apache/pulsar/pull/7917


   


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

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



[GitHub] [pulsar] Jennifer88huang commented on a change in pull request #7917: [Issue 7864][docs]Update document for how to pick active consumer for failover subscription.

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



##########
File path: site2/docs/concepts-messaging.md
##########
@@ -254,7 +254,7 @@ In the diagram below, only **Consumer A-0** is allowed to consume messages.
 
 ### Failover
 
-In *failover* mode, multiple consumers can attach to the same subscription. In failover mode, the broker selects the master consumer based on the priority level and the lexicographical sorting of a consumer name. If two consumers have an identical priority level, the broker selects the master consumer based on the lexicographical sorting. If these two consumers have different priority levels, the broker selects the consumer with a higher priority level as the master consumer. The master consumer is initially the only one receiving messages. When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line.
+In *failover* mode, multiple consumers can attach to the same subscription. For partitioned topic, in failover mode the broker selects the master consumer based on the priority level and the lexicographical sorting of a consumer name. If two consumers have an identical priority level, the broker selects the master consumer based on the lexicographical sorting. If these two consumers have different priority levels, the broker selects the consumer with a higher priority level as the master consumer. The master consumer is initially the only one receiving messages. When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line. For non-partitioned topic in failover mode the broker will pick consumer in the order they subscribe to the non partitioned topic.
 
 For partitioned topics, the broker assigns partitioned topics to the consumer with the highest priority level. If multiple consumers have the highest priority level, the broker evenly assigns topics to consumers with these consumers.
 

Review comment:
       Suggestions from language perspectives:
   
   In *failover* mode, multiple consumers can attach to the same subscription. In failover mode, the broker selects the master consumer for the partitioned topic based on the priority level and the lexicographical sorting of a consumer name. If two consumers have an identical priority level, the broker selects the master consumer based on the lexicographical sorting. If these two consumers have different priority levels, the broker selects the consumer with a higher priority level as the master consumer. Only the master consumer receives messages. When the master consumer is not connected, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line. 
   
   The broker assigns partitioned topics to the consumer with the highest priority level. If multiple consumers have the same priority level, the broker assigns topics to consumers evenly. 
   
   In failover mode, the broker selects the master consumer for a non-partitioned topic based on the order that they subscribe to the non-partitioned topic.

##########
File path: site2/docs/concepts-messaging.md
##########
@@ -254,7 +254,7 @@ In the diagram below, only **Consumer A-0** is allowed to consume messages.
 
 ### Failover
 
-In *failover* mode, multiple consumers can attach to the same subscription. In failover mode, the broker selects the master consumer based on the priority level and the lexicographical sorting of a consumer name. If two consumers have an identical priority level, the broker selects the master consumer based on the lexicographical sorting. If these two consumers have different priority levels, the broker selects the consumer with a higher priority level as the master consumer. The master consumer is initially the only one receiving messages. When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line.
+In *failover* mode, multiple consumers can attach to the same subscription. For partitioned topic, in failover mode the broker selects the master consumer based on the priority level and the lexicographical sorting of a consumer name. If two consumers have an identical priority level, the broker selects the master consumer based on the lexicographical sorting. If these two consumers have different priority levels, the broker selects the consumer with a higher priority level as the master consumer. The master consumer is initially the only one receiving messages. When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line. For non-partitioned topic in failover mode the broker will pick consumer in the order they subscribe to the non partitioned topic.
 
 For partitioned topics, the broker assigns partitioned topics to the consumer with the highest priority level. If multiple consumers have the highest priority level, the broker evenly assigns topics to consumers with these consumers.
 

Review comment:
       Do the following two have some conflicts?
   1. If multiple consumers have the same priority level, the broker assigns topics to consumers evenly."
   2.  If two consumers have an identical priority level, the broker selects the master consumer based on the lexicographical sorting.




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

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



[GitHub] [pulsar] Jennifer88huang commented on a change in pull request #7917: [Issue 7864][docs]Update document for how to pick active consumer for failover subscription.

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



##########
File path: site2/docs/concepts-messaging.md
##########
@@ -254,9 +254,11 @@ In the diagram below, only **Consumer A-0** is allowed to consume messages.
 
 ### Failover
 
-In *failover* mode, multiple consumers can attach to the same subscription. In failover mode, the broker selects the master consumer based on the priority level and the lexicographical sorting of a consumer name. If two consumers have an identical priority level, the broker selects the master consumer based on the lexicographical sorting. If these two consumers have different priority levels, the broker selects the consumer with a higher priority level as the master consumer. The master consumer is initially the only one receiving messages. When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line.
+In *failover* mode, multiple consumers can attach to the same subscription. A master consumer will be picked for non-partitioned topic or each partition of partitioned topic. The master consumer is the only one receiving messages. When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line. 

Review comment:
       that's ok




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

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



[GitHub] [pulsar] MarvinCai commented on a change in pull request #7917: [Issue 7864][docs]Update document for how to pick active consumer for failover subscription.

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



##########
File path: site2/docs/concepts-messaging.md
##########
@@ -254,7 +254,7 @@ In the diagram below, only **Consumer A-0** is allowed to consume messages.
 
 ### Failover
 
-In *failover* mode, multiple consumers can attach to the same subscription. In failover mode, the broker selects the master consumer based on the priority level and the lexicographical sorting of a consumer name. If two consumers have an identical priority level, the broker selects the master consumer based on the lexicographical sorting. If these two consumers have different priority levels, the broker selects the consumer with a higher priority level as the master consumer. The master consumer is initially the only one receiving messages. When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line.
+In *failover* mode, multiple consumers can attach to the same subscription. For partitioned topic, in failover mode the broker selects the master consumer based on the priority level and the lexicographical sorting of a consumer name. If two consumers have an identical priority level, the broker selects the master consumer based on the lexicographical sorting. If these two consumers have different priority levels, the broker selects the consumer with a higher priority level as the master consumer. The master consumer is initially the only one receiving messages. When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line. For non-partitioned topic in failover mode the broker will pick consumer in the order they subscribe to the non partitioned topic.
 
 For partitioned topics, the broker assigns partitioned topics to the consumer with the highest priority level. If multiple consumers have the highest priority level, the broker evenly assigns topics to consumers with these consumers.
 

Review comment:
       Thanks for the comment, yes it's conflicting description, I've updated the doc to reflect the latest way broker pick active consumer for topic in failover sub mode.




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

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



[GitHub] [pulsar] MarvinCai commented on a change in pull request #7917: [Issue 7864][docs]Update document for how to pick active consumer for failover subscription.

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



##########
File path: site2/docs/concepts-messaging.md
##########
@@ -254,9 +254,11 @@ In the diagram below, only **Consumer A-0** is allowed to consume messages.
 
 ### Failover
 
-In *failover* mode, multiple consumers can attach to the same subscription. In failover mode, the broker selects the master consumer based on the priority level and the lexicographical sorting of a consumer name. If two consumers have an identical priority level, the broker selects the master consumer based on the lexicographical sorting. If these two consumers have different priority levels, the broker selects the consumer with a higher priority level as the master consumer. The master consumer is initially the only one receiving messages. When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line.
+In *failover* mode, multiple consumers can attach to the same subscription. A master consumer will be picked for non-partitioned topic or each partition of partitioned topic. The master consumer is the only one receiving messages. When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line. 

Review comment:
       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.

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



[GitHub] [pulsar] MarvinCai commented on a change in pull request #7917: [Issue 7864][docs]Update document for how to pick active consumer for failover subscription.

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



##########
File path: site2/docs/concepts-messaging.md
##########
@@ -254,9 +254,11 @@ In the diagram below, only **Consumer A-0** is allowed to consume messages.
 
 ### Failover
 
-In *failover* mode, multiple consumers can attach to the same subscription. In failover mode, the broker selects the master consumer based on the priority level and the lexicographical sorting of a consumer name. If two consumers have an identical priority level, the broker selects the master consumer based on the lexicographical sorting. If these two consumers have different priority levels, the broker selects the consumer with a higher priority level as the master consumer. The master consumer is initially the only one receiving messages. When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line.
+In *failover* mode, multiple consumers can attach to the same subscription. A master consumer will be picked for non-partitioned topic or each partition of partitioned topic. The master consumer is the only one receiving messages. When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line. 

Review comment:
       I'll keep the non-partitioned topic or each partition of partitioned topic part cuz I think reader will need this detail here.




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

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



[GitHub] [pulsar] Jennifer88huang commented on pull request #7917: [Issue 7864][docs]Update document for how to pick active consumer for failover subscription.

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


   @MarvinCai Thanks for your contribution. You can use present tense rather than future tense, try to avoid using "will" where possible.
   For details, refer to https://developers.google.com/style/tense


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

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



[GitHub] [pulsar] Jennifer88huang commented on pull request #7917: [Issue 7864][docs]Update document for how to pick active consumer for failover subscription.

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


   @codelipenghui please help check whether the logic is correct, thank you.


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

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