-
Notifications
You must be signed in to change notification settings - Fork 16
Description
🚀 Feature Request
The feature I am requesting is essentially the callback
feature in the HiveMQ Java Client. See example and Javadoc.
🔈 Motivation
I am currently evaluating migrating some .NET Core apps from the M2MQTT library to this one after having successfully migrating a number of Java applications from the Paho Java library to the HiveMQ Java library. You are all probably aware of my motivations for using this library (MQTT5 support, async APIs, etc.)
The motivations for adding this feature are primarily:
- Feature parity with the HiveMQ Java library (this makes it easy for users/orgs leveraging both libraries)
- Separation of concerns in client code
- Ex. I might have two classes that subscribe to different MQTT topics for entirely different reasons. Methods/callbacks in these classes should not need to filter out irrelevant messages.
🛰 Alternatives
My current alternative is to implement this logic in my client application. I create a wrapper around the IHiveMQClient
library that manages subscriptions internally and calls the relevant callbacks as needed.
📎 Additional context
Please let me know if any additional content is needed or if this feature already exists and I somehow missed it.