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
Rewrite rules #126
Comments
An experimental design in 0.8.0 release: https://github.com/emqtt/emqttd/wiki/Rewrite |
@Hades32, released 0.8.0-alpha with this feature. please try it. |
It's working very well! Great! What I haven't tried yet: I assume ACLs are applied after the rewrite. Correct? |
No, ACL are applied before rewrite. |
so, have you come to the conclusion, that it is better to have them applied BEFORE rewrite? |
@Hades32, no finally conclusion. We could improve the design when more users use the Rewrite feature. For this feature is planned in 0.8.0 release, I close it first and we could submit new issue to enhance this feature in the late release. |
feature request
Motivation
When operating a system for a longer time you will want to "refactor" your topic structure, just like any other part of your system. But when the clients cannot be update instantly (like IoT and mobile devices) this is a problem. Either you make double subscriptions and double your publications for the old and the new topic structure or you keep everything as it is and only add new stuff.
Solution Proposal
In the world of HTTP the solution to above's problem has long been established: rewrite rules. E.g. an Apache has some regex that makes http://host.com/old/customers and changes it to http://host.com/new/sub/customers .
I'm proposing a similar feature for mqtt. The most straight forward approach I could think of would be to allow regex search and replace on a per Publish/Subscribe message base. So that the replacement could happen when a sub or pub arrives and the rest of the system always only sees the new topics.
The text was updated successfully, but these errors were encountered: