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

Per-Subscription Callbacks #106

Closed
tmbull opened this issue Oct 30, 2023 · 6 comments
Closed

Per-Subscription Callbacks #106

tmbull opened this issue Oct 30, 2023 · 6 comments
Labels
enhancement New feature or request feature request Request for new functionality

Comments

@tmbull
Copy link

tmbull commented Oct 30, 2023

🚀 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.

@tmbull tmbull added the enhancement New feature or request label Oct 30, 2023
@github-actions
Copy link

Hello @tmbull, thanks for contributing to the HiveMQ community! We will respond as soon as possible.

@pglombardo pglombardo added the feature request Request for new functionality label Oct 31, 2023
@pglombardo
Copy link
Collaborator

Hi Tristan - this is a great feature request/needs to be added. Unfortunately I don't have an ETA yet - there are a couple other things I need to get out of the way first. I'll keep this issue open and update here once I have some news/progress.

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.

This is a fair work-around but I agree that it's not ideal.

@tmbull
Copy link
Author

tmbull commented Oct 31, 2023

Thanks for the quick reply @pglombardo! I will continue to monitor for progress.

@pglombardo
Copy link
Collaborator

Hi @tmbull - Happy new year. I'm putting this together now. I'll should have a new release soon.

@pglombardo
Copy link
Collaborator

Per subscriptions have been added in package v0.10.0. I've also added a bunch of documentation to hopefully help out.

If you give this a try, let me know how it goes @tmbull!

@pglombardo
Copy link
Collaborator

Since I haven't heard back I'll close this out. If you still have any issues/questions, please let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature request Request for new functionality
Projects
None yet
Development

No branches or pull requests

2 participants