Comments (2)
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.
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)
- MQTT-over-Websocket connection reconnects every 30 seconds (MAUI regression) HOT 1
- Can't connect to broker using CA Cert ClientCert and Key HOT 2
- Unable to connect with Unix Socket HOT 4
- Last Will not working? HOT 2
- [FR] Protobuf HOT 4
- PublishAsync doesn't return a result nor exception HOT 4
- Linux - when Upgrading from version 4.3.3.952 to 4.3.4.1084 the client always raises the exception «None of the discovered or specified addresses match the socket address family» HOT 7
- No connection could be made because the target machine actively refused it. HOT 1
- Breaking Change in MqttClientTcpOptions with 4.3.5.1141 HOT 5
- Managed MQTT client hangs when trying to disconnect using `StopAsync()` in Unity Engine HOT 4
- UWP PublishAsync forever hangs
- Event when pending ApplicationMessage was published HOT 1
- MqttClientOptionsBuilder.WithTcpServer:The “_remoteEndPoint” is missing instantiation
- Json serialized messages wont get published to the broker. HOT 3
- Connecting To localhost...Could not open connection to the host, on port 1883: Connect failed HOT 2
- The type or namespace name 'Options' does not exist in the namespace 'MQTTnet.Client' (are you missing an assembly reference?) HOT 6
- Connect async via TLS is different on Windows and Linux. HOT 3
- Issue in MQTTnet version 4.3.6.1152 HOT 1
- WebSocket connection to 'ws://127.0.0.1:10086/' failed:
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mqttnet.