-
for example 3 partion 4 consumer, How to allocate partition consumption |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Could you further describe your use case? From my understanding, partitions in pulsar are a detail that is mostly abstracted away for consumers and producers.
Now you can create a consumer on with If you have a producer that produces to So producers and consumers don't have to care about the partitions as this detail is abstracted away by Pulsar. You could however create a consumer with This also depends on the type of subscription used, maybe this is helpful: https://pulsar.apache.org/docs/next/client-libraries-consumers/ I hope that answers your question 🙂 |
Beta Was this translation helpful? Give feedback.
In Pulsar we have Topics. Topics can be partitioned or non-partitioned. A partitioned Topic is a virtual concept since it can be used in the same way as a non-partitioned Topic. Pulsar will "wrap" the partitions away. (A consumer will be implicitly subscribed to each partition). However, you can decide to explicitly listen to a specific partition.
Consumers don't subscribe to Topics directly, they do it through a Subscription. A Topic can have n - Subscriptions. If a Topic has 2 Subscriptions, Pulsar will send the message to each Subscription simultaneously. Once an acknowledgment of the message was sent for each Subscription, the message will be deleted.
A Subscription has a type (explic…