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

Add support for placeholders in topic #5

Open
licensedslacker opened this issue Jun 3, 2019 · 4 comments
Open

Add support for placeholders in topic #5

licensedslacker opened this issue Jun 3, 2019 · 4 comments

Comments

@licensedslacker
Copy link

It would be handy to have placeholders in the topic field.
For example "/topic/%i" become "/topic/1" when connected by a client with ID 1.

Client ID would be one field. A random unique number would be also nice.

@krylovsk
Copy link
Owner

Will #6 work for your use case?

@krylovsk
Copy link
Owner

krylovsk commented Oct 13, 2019

@licensedslacker can you describe the suggestion with topic placeholders in more detail?

How about just letting each client sending to their own topic (what you suggest as example)?
From what I see providing a template or a number of topics (suggestion of @edoardesd in #6) requires sharding of messages into different topics with a fair and deterministic algorithm to get unbiased aggregated results.

If brokers treat topics with different number of writers or messages in the queue differently it may skew the measurements.

@licensedslacker
Copy link
Author

I think case #6 does not directly satisfy my request. My intention was to add a unique client ID to the topic, not just a random number. The use case what I had in my mind was many-to-one topology where multiple clients produce messages to one receiver and the sender information is encoded into the topic.

@edoardesd
Copy link

Sorry for the late reply.

Even if there are some similarities, my proposal is slightly different from the one of @licensedslacker .
In #6, I want to give the possibility to the user to have N clients and M different topics. The simplest way to do it is adding a random number between 0 and M to the topic level. Of course is a trivial solution that not ensure at all to have M different topics, but it's a first step.

This allows a user to test the impact of the number of different topics to the broker. Think about having 100 fixed clients and you want to see what happen when there are 10, 20, 50 or 100 possible topics.

A special case, is when N == M (clients == different topics you want to use). Here we are in the case proposed by @licensedslacker , because we can reuse the topic fashion he explained in the first post.
It might be possible to reuse his topic fashion even when N != M. For example: 10 clients and 2 topics will became topic/1 for the first 5 clients and topic/2 for the remain clients.

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

3 participants