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

Introduce XML Configuration Option for Dollar-Topic Publishing #523

Open
Z0rdak opened this issue Aug 14, 2024 · 0 comments
Open

Introduce XML Configuration Option for Dollar-Topic Publishing #523

Z0rdak opened this issue Aug 14, 2024 · 0 comments

Comments

@Z0rdak
Copy link

Z0rdak commented Aug 14, 2024

Problem or Use Case

Currently, by default, when a client sends a PUBLISH to a Dollar-Topic, the client will be disconnected. This behaviour is restricted to an internal configuration which can only be changed by changing the source.

However, I think there is a valid use case where enabling clients to publish to Dollar-Topics could significantly enhance the broker's functionality through custom extensions.

Use Case

Developers (e.g. my students and myself) may want to create custom extensions that add new features to the broker, which could be interacted with via messages published to Dollar-Topics. While the MQTT standard generally restricts clients from publishing to Dollar-Topics, enabling this functionality would allow for innovative broker-side extensions that interact with clients via these reserved topics.

Here is one example from EMQX leveraging Dollar-Topics to introduce innovative broker-side extensions.

Note

It is understood that Dollar-Topics are are generally reserved for broker-specific metrics and not intended for client-to-client communication according to MQTT standards and best practices. However, in this scenario, the intention is for clients to interact directly with the broker, not with other clients. Thus, the use of Dollar-Topics in this context could be a powerful tool for extending the broker's capabilities.

Preferred Solution or Suggestions

Introduce a configuration option within HiveMQ that allows clients to publish to Dollar-Topics. This configuration should be disabled by default to comply with the MQTT standard, but it can be explicitly enabled by users who understand the implications and need this functionality for their specific use cases.

Implementation Suggestions

  • Configuration Setting: Make the already existing internal configuration field accessible for users so it can be configured through the already existing XML-Configuration. (InternalConfigurations.java)

  • Extension Interaction: With this setting enabled, HiveMQ should allow clients to publish to Dollar-Topics, which can then be handled by custom extensions. This could be particularly useful for developers who want to extend the broker's behavior by adding features that are controlled or triggered through these special topics.

Best regards

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

1 participant