Using 3.2.1 Pulsar QQ #1: Does `Failover`, `Exclu...
# general
n
Using 3.2.1 Pulsar QQ #1: Does
Failover
,
Exclusive
,
Shared
,
Key_Shared
Subscriptions work on all the partitions in a topic or they are limited to only one partition in a topic ? When using OpenMessagingBenchmark with Failover mode, we see that there is delay up on a partitioned topic. Wondering whats the behaviour of these subscription modes on a partitioned topic QQ #2: We are creating a
tenant (c1, c2, c3 .. cN, cAgg)
,
namespace (c1, c2, c3,. ... cN, cAgg)
,
topic (c1, c2, c3 ... CN, cAgg)
and using per message replication clusters to
(cAgg)
this gives us flexibility to aggregate messages from all (1..N) clusters to (cAgg). Any scalability concerns to be worried about when N (number of clusters) are in few thousands ?
l
very good questions. Please create a discussion at https://github.com/apache/pulsar/discussions/new?category=q-a with these questions and then promote it here.
➕ 3
d
The short answer is that subscriptions work across all partitions in the topic. Except for the failover subscription, which assigns a consumer to a partition (like the Kafka consumer group model).
y
I am hesitated to answer questions like those in slack. Before you ask question, show what study/research/document you read. This way, we can understand which part is missing for users to self-help and improve the project.
l
@Yu Wei Sung Sure there can be discussions, but there's a tradeoff: your effort to answer the question on Slack will be mostly lost after a while. If you instead ask the person who asked the question to ask it on GitHub discussions, that will build up a valuable knowledge base for the Apache Pulsar community over time.
➕ 1
we need people to go to https://github.com/apache/pulsar/discussions/categories/q-a to search for existing answers and ask a new question if they don't find an answer
n
Though Q1 looks silly off the OMB + Pulsar docs, there are some practical observations we had. Lemme explain further. We have 5 standalone clusters (s1..5) & 1 distributed pulsar (d1) & geo-replication is enabled between these 6 clusters. we have twewaked OMB to support running producers on one side (s1..s5) and running consumers on other side (d1). The profile is 10K messages/sec (10MB/s/producer) for producers (total 50K messages/sec, 50MB/sec). With Failover subscription mode on the 1 consumer, we did see that lag kept increasing on a partitioned topic with 10 partitions. https://pulsar.apache.org/docs/next/client-libraries-consumers/#subscribe-to-topics talks about 1 consumer per partition to be created on a partitioned topic. So, the complexity is with finding the right math for this tuple (topic, # partitions, subscriptionName, subscriptionType, #consumerObjects). It isn't very clear for a topic with N partitions with one microservice running with a Subscription of type, how many consumer objects to be created to ensure that the consumer can keep up with the # producers ?
Apparently with Kafka, when as there is (topic, #partitoins, consumerGroup, #consumerObjects) the mapping is 1:1 with consumerObject & topicPartition. With Other messaging systems (topic/queue, subscription, #consumerObjects), they support competing consumer pattern. So, need some inputs here.
d
Pulsar has the shared subscription type that supports the competing consumers pattern
n
Wasn't aware of this new Q/A forum. Posting the questions from there : https://github.com/apache/pulsar/discussions/22437 & https://github.com/apache/pulsar/discussions/22438
thankyou 1
l
I have replied to both questions. I hope others review the answers and add more necessary details.