This is an automated email from the ASF dual-hosted git repository.
mmerli 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 e2b264b5c87 Clarify Exclusive and Failover subscription types. (#15785)
e2b264b5c87 is described below
commit e2b264b5c87f7f448831a07dc1b7c6a7828f7d19
Author: Asaf Mesika <[email protected]>
AuthorDate: Wed May 25 19:29:15 2022 +0300
Clarify Exclusive and Failover subscription types. (#15785)
---
site2/docs/concepts-messaging.md | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/site2/docs/concepts-messaging.md b/site2/docs/concepts-messaging.md
index b3520d70e8b..484099fc8f1 100644
--- a/site2/docs/concepts-messaging.md
+++ b/site2/docs/concepts-messaging.md
@@ -545,7 +545,7 @@ When a subscription has no consumers, its subscription type
is undefined. The ty
#### Exclusive
-In *Exclusive* type, only a single consumer is allowed to attach to the
subscription. If multiple consumers subscribe to a topic using the same
subscription, an error occurs.
+In *Exclusive* type, only a single consumer is allowed to attach to the
subscription. If multiple consumers subscribe to a topic using the same
subscription, an error occurs. Note that if the topic is partitioned, all
partitions will be consumed by the single consumer allowed to be connected to
the subscription.
In the diagram below, only **Consumer A-0** is allowed to consume messages.
@@ -555,12 +555,14 @@ In the diagram below, only **Consumer A-0** is allowed to
consume messages.
#### Failover
-In *Failover* type, 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.
+In *Failover* type, multiple consumers can attach to the same subscription. A
master consumer is picked for non-partitioned topic or for 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, 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 partitioned topics, broker will sort consumers by priority level and
lexicographical order of consumer name. Then broker will try to evenly assigns
partitions 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.
+For example: a partitioned topic has 15 partitions, and 3 consumers. Each
consumer will be active for 5 partitions. Each partition will have 1 active
consumer and 4 stand-by consumers.
+
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.
