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

AbstractVertxBasedMqttProtocolAdapter improvement idea #3613

Open
harism opened this issue Feb 6, 2024 · 0 comments
Open

AbstractVertxBasedMqttProtocolAdapter improvement idea #3613

harism opened this issue Feb 6, 2024 · 0 comments

Comments

@harism
Copy link
Contributor

harism commented Feb 6, 2024

I noticed a while ago that Hono is released to Maven repository too, this is totally nice of you(!!!). But quite soon after pondering over the architecture all-in-all, and trying it briefly can I setup an Mqtt adapter with my "own code" in the Hono way (NOT THE EXAMPLE!!!) I had some sort of issues.

There is this one switch-case location in AbstractVertxBasedMqttProtocolAdapter.java where it could be beneficial not to make it mandatory to separate telemetries, events and command responses here on abstract level already. I mean this makes it very much Hono Mqtt specification specific, Mqtt does not have these concepts itself.

For the payload handling, what I'd like to see, is some base class - say DownstreamMessage which all these three different message "types" implement or extend. And there could be some very generic "parse me" method needed for actual implementation classes only. And for this parsing method return value could be simply a list or collection of DownstreamMessages wrapped inside a Future instead.

Also I believe something similar should be doable, using the same abstraction class still, to overcome it that Hono Mqtt Command&Control functionality is sort of hard coded into Hono specific topics and functionality only. Maybe I'm over simplifying this idea, but some rather abstract method called "accept topic(s)", or alike, could do the trick. I hope so at least ;)

Hope you catch up with it what I'm after. I'm trying to be as accurate as I simply can but finding Hono on Maven.. You just do not see this coming your way every day.

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