Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Topic Name requires a certain format #256

Open
dmarsh12 opened this issue Mar 8, 2024 · 1 comment
Open

Topic Name requires a certain format #256

dmarsh12 opened this issue Mar 8, 2024 · 1 comment

Comments

@dmarsh12
Copy link

dmarsh12 commented Mar 8, 2024

Hi there! When trying to set a topic name in the non-conventional format such as ":persistant/default/local/some.namespace/some.othernamespace/topic" it throws an error saying the topic name is incorrect. It expects the format to either be a single string, or be separated by 3 "/".

However, I do not see any actual limitation in Pulsar/DotPulsar doing the same. While I do see recommendations from Pulsar, there is nothing in DotPulsar preventing you from doing so and the provided example topic is perfectly valid in DotPulsar. Is there a particular reason why it's not allowed in the PulsarClient? I believe there should be an option to set the fully qualified topic like the example provided and not have such limitations built into the name.

Here is the relevant code: https://github.com/fsprojects/pulsar-client-dotnet/blob/develop/src/Pulsar.Client/Common/TopicName.fs

Currently, I see the error generated on line 53 as it assumes I am inputting a short topic name instead of a fully qualified topic.

@Lanayx
Copy link
Member

Lanayx commented Mar 8, 2024

In pulsar topic names always follow conventional format where tenant, namespace and name are separates with slashes. If you are to put more slashes in, it becomes confusing - what is what, so you should expect tooling to break often.
Still, Pulsar.Client closely followes Java implementation, so if it's allowed there, you can create PR with change. DotPulsar implementation details are not taken into account at any time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants