This is an automated email from the ASF dual-hosted git repository. penghui pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push: new 6a2b574 [Issue 7864][docs]Update document for how to pick active consumer for failover subscription. (#7917) 6a2b574 is described below commit 6a2b5745ebe96a13a6918596e15f6f6b2af2e342 Author: Marvin Cai <cai19930...@gmail.com> AuthorDate: Wed Sep 2 06:21:42 2020 -0700 [Issue 7864][docs]Update document for how to pick active consumer for failover subscription. (#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 --- site2/docs/concepts-messaging.md | 6 ++++-- site2/website/versioned_docs/version-2.5.0/concepts-messaging.md | 6 ++++-- site2/website/versioned_docs/version-2.5.1/concepts-messaging.md | 6 ++++-- site2/website/versioned_docs/version-2.5.2/concepts-messaging.md | 6 ++++-- site2/website/versioned_docs/version-2.6.0/concepts-messaging.md | 6 ++++-- site2/website/versioned_docs/version-2.6.1/concepts-messaging.md | 6 ++++-- site2/website/versioned_docs/version-2.6.2/concepts-messaging.md | 6 ++++-- 7 files changed, 28 insertions(+), 14 deletions(-) diff --git a/site2/docs/concepts-messaging.md b/site2/docs/concepts-messaging.md index 2a1e782..1ca6feb 100644 --- a/site2/docs/concepts-messaging.md +++ b/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 [...] +In *failover* mode, multiple consumers can attach to the same subscription. A master consumer is picked for non-partitioned topic or each partition of partitioned topic and receives messages. When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line. -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. +For partitioned topics, broker will sort consumers by priority level and lexicographical order of consumer name. Then broker will try to evenly assigns topics to consumers with the highest priority level. + +For non-partitioned topic, broker will pick consumer in the order they subscribe to the non partitioned topic. In the diagram below, **Consumer-B-0** is the master consumer while **Consumer-B-1** would be the next consumer in line to receive messages if **Consumer-B-0** is disconnected. diff --git a/site2/website/versioned_docs/version-2.5.0/concepts-messaging.md b/site2/website/versioned_docs/version-2.5.0/concepts-messaging.md index e9840a4..3066286 100644 --- a/site2/website/versioned_docs/version-2.5.0/concepts-messaging.md +++ b/site2/website/versioned_docs/version-2.5.0/concepts-messaging.md @@ -183,9 +183,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 [...] +In *failover* mode, multiple consumers can attach to the same subscription. A master consumer is picked for non-partitioned topic or each partition of partitioned topic and receives messages. When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line. -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. +For partitioned topics, broker will sort consumers by priority level and lexicographical order of consumer name. Then broker will try to evenly assigns topics to consumers with the highest priority level. + +For non-partitioned topic, broker will pick consumer in the order they subscribe to the non partitioned topic. In the diagram below, **Consumer-B-0** is the master consumer while **Consumer-B-1** would be the next consumer in line to receive messages if **Consumer-B-0** is disconnected. diff --git a/site2/website/versioned_docs/version-2.5.1/concepts-messaging.md b/site2/website/versioned_docs/version-2.5.1/concepts-messaging.md index 0661963..74889a2 100644 --- a/site2/website/versioned_docs/version-2.5.1/concepts-messaging.md +++ b/site2/website/versioned_docs/version-2.5.1/concepts-messaging.md @@ -202,9 +202,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 [...] +In *failover* mode, multiple consumers can attach to the same subscription. A master consumer is picked for non-partitioned topic or each partition of partitioned topic and receives messages. When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line. -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. +For partitioned topics, broker will sort consumers by priority level and lexicographical order of consumer name. Then broker will try to evenly assigns topics to consumers with the highest priority level. + +For non-partitioned topic, broker will pick consumer in the order they subscribe to the non partitioned topic. In the diagram below, **Consumer-B-0** is the master consumer while **Consumer-B-1** would be the next consumer in line to receive messages if **Consumer-B-0** is disconnected. diff --git a/site2/website/versioned_docs/version-2.5.2/concepts-messaging.md b/site2/website/versioned_docs/version-2.5.2/concepts-messaging.md index efbfb20..d5d5833 100644 --- a/site2/website/versioned_docs/version-2.5.2/concepts-messaging.md +++ b/site2/website/versioned_docs/version-2.5.2/concepts-messaging.md @@ -202,9 +202,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 [...] +In *failover* mode, multiple consumers can attach to the same subscription. A master consumer is picked for non-partitioned topic or each partition of partitioned topic and receives messages. When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line. -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. +For partitioned topics, broker will sort consumers by priority level and lexicographical order of consumer name. Then broker will try to evenly assigns topics to consumers with the highest priority level. + +For non-partitioned topic, broker will pick consumer in the order they subscribe to the non partitioned topic. In the diagram below, **Consumer-B-0** is the master consumer while **Consumer-B-1** would be the next consumer in line to receive messages if **Consumer-B-0** is disconnected. diff --git a/site2/website/versioned_docs/version-2.6.0/concepts-messaging.md b/site2/website/versioned_docs/version-2.6.0/concepts-messaging.md index 839722a..7e39b37 100644 --- a/site2/website/versioned_docs/version-2.6.0/concepts-messaging.md +++ b/site2/website/versioned_docs/version-2.6.0/concepts-messaging.md @@ -232,9 +232,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 [...] +In *failover* mode, multiple consumers can attach to the same subscription. A master consumer is picked for non-partitioned topic or each partition of partitioned topic and receives messages. When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line. -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. +For partitioned topics, broker will sort consumers by priority level and lexicographical order of consumer name. Then broker will try to evenly assigns topics to consumers with the highest priority level. + +For non-partitioned topic, broker will pick consumer in the order they subscribe to the non partitioned topic. In the diagram below, **Consumer-B-0** is the master consumer while **Consumer-B-1** would be the next consumer in line to receive messages if **Consumer-B-0** is disconnected. diff --git a/site2/website/versioned_docs/version-2.6.1/concepts-messaging.md b/site2/website/versioned_docs/version-2.6.1/concepts-messaging.md index afa019c..2dfb7db 100644 --- a/site2/website/versioned_docs/version-2.6.1/concepts-messaging.md +++ b/site2/website/versioned_docs/version-2.6.1/concepts-messaging.md @@ -255,9 +255,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 [...] +In *failover* mode, multiple consumers can attach to the same subscription. A master consumer is picked for non-partitioned topic or each partition of partitioned topic and receives messages. When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line. -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. +For partitioned topics, broker will sort consumers by priority level and lexicographical order of consumer name. Then broker will try to evenly assigns topics to consumers with the highest priority level. + +For non-partitioned topic, broker will pick consumer in the order they subscribe to the non partitioned topic. In the diagram below, **Consumer-B-0** is the master consumer while **Consumer-B-1** would be the next consumer in line to receive messages if **Consumer-B-0** is disconnected. diff --git a/site2/website/versioned_docs/version-2.6.2/concepts-messaging.md b/site2/website/versioned_docs/version-2.6.2/concepts-messaging.md index 7394161..922a3a2 100644 --- a/site2/website/versioned_docs/version-2.6.2/concepts-messaging.md +++ b/site2/website/versioned_docs/version-2.6.2/concepts-messaging.md @@ -255,9 +255,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 [...] +In *failover* mode, multiple consumers can attach to the same subscription. A master consumer is picked for non-partitioned topic or each partition of partitioned topic and receives messages. When the master consumer disconnects, all (non-acknowledged and subsequent) messages are delivered to the next consumer in line. -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. +For partitioned topics, broker will sort consumers by priority level and lexicographical order of consumer name. Then broker will try to evenly assigns topics to consumers with the highest priority level. + +For non-partitioned topic, broker will pick consumer in the order they subscribe to the non partitioned topic. In the diagram below, **Consumer-B-0** is the master consumer while **Consumer-B-1** would be the next consumer in line to receive messages if **Consumer-B-0** is disconnected.