Giter Site home page Giter Site logo

Comments (2)

xyderos avatar xyderos commented on June 16, 2024

I think this is more of a "broker specific" question as most of the brokers just allow the messages to pass through them. In a more general context, you would need to have a QoS of at least 1 or 2, not having set the clear flag and have some sort of TTL in place which I am not sure mqtt supports that.

A "dirty approach" would be to subscribe to the db/logging whatever service to a topic that would essentially ping you when there is an update and you would execute a request/response scheme.

                  |          SUBSCRIBE TO "NOTIFIER"                   |
                  |------------------------------------------------------------>|
                  |         RECEIVED EVENT "NOTIFIER"                |
Consumer|<------------------------------------------------------------|Producer
                  |QUERY THE DB WITH A PUBLISH MESSAGE|
                  |------------------------------------------------------------>|
                  |RECEIVE RESPONSE IN A DIFFERENT TOPIC|
                  |<------------------------------------------------------------|

But are you sure MQTT is the right way to solve the problem?

from mqttnet.

vaLP2eh avatar vaLP2eh commented on June 16, 2024

Yes, MQTT is the right way to go for the use case I work on.

I read more in the source code to get a better understanding. It's a pity that there is no documentation for IntelliSense provided by this project. Makes the API difficult to understand. Anyway...

My plan is to use the intercept-subscribe to restore the messages (if needed/requested) for the calling client and the intercept-unsubscribe/-disconnected to cleanup if needed. Should work fine.

from mqttnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.