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 11:30:51 UTC

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

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