<@U078Y59KC3B> can 2 subscriptions for different t...
# ask-ai
s
@RunLLM can 2 subscriptions for different topics have the same subscription name?
r
Yes, two subscriptions for different topics can have the same subscription name. In Pulsar, a subscription is the binding between a topic (or partition) and a consumer, and the subscription name is scoped to the topic, not globally unique across all topics. This means you can use the same subscription name on multiple topics without conflict, and each topic will maintain its own independent subscription state for that name. According to Pulsar documentation and StreamNative glossary, this is standard behavior. Would you like more detail or examples? Sources: - Pulsar documentation - StreamNative glossary 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
s
@RunLLM are there any recommendations around the naming convention for subscriptions? Should the subscription name include the topic name?
r
It seems likely that Pulsar does not enforce a specific naming convention for subscription names, and there is no strict requirement to include the topic name in the subscription name. However, some organizations recommend using only alphanumeric characters, dashes, dots, and underscores (a-zA-Z0-9.-_) for subscription names, and avoiding special characters like slashes, as discussed in this PR. Including the topic name in the subscription name is not required, but it may help with clarity in some use cases. Would you like more detail or best practices from community discussions? Sources: - this PR 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
s
@RunLLM what is the limit on length of subscription name?
r
My understanding is that there is currently no hardcoded length limit for subscription names in Pulsar, but some validations and optional limits are being discussed or implemented. For example, a proposal exists to add validation for subscription names, and some environments (like brokers) may introduce configurable limits in the future (see discussion). No explicit maximum length is enforced by default as of now. Would you like more detail on current or proposed limits? Sources: - Enhancement: Validation of subscription names in the Pulsar broker 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.