Comments (4)
I think we use exec()
and not shell, so no, that wouldn't work.
If you'll pardon my question? What on earth are you doing? ;-) A subscribe when a publish occurs in order to publish it? I had to wrap my head around that one ...
What are you attempting to accomplish?
from mqtt-launcher.
@jpmens I can understand your confusion :-)
I have this setup:
remote clients -> remote broker 1 <--bridge--> local broker
remote clients -> remote broker 2 <--bridge--> local broker
remote clients -> remote broker 3 <--bridge--> local broker
The assumption is that I cannot query the remote brokers directly (nor do I want to since I would like the setup to be agnostic).
I need to know from my local broker how many clients are connected to each of my remote brokers.
With my "twisted" setup I issue a publish
on my local broker which is bridged to all my remote brokers so that mqtt-launcher queries the remote brokers locally and publishes the results on an identifiable topic which is then bridged back to my local broker.
I tried configuring mqtt-launcher with a local
payload that triggers a mosquitto_sub -t $SYS/broker/clients/connected
on the remote broker and reading the output from the report
topic on the local broker. But I have no way of associating the output to the remote broker.
I pretty new to MQTT so I'm sure there's a better way of doing this. Any suggestion would be much appreciated :-)
from mqtt-launcher.
My head hurts. :-)
I think this is the main sentence:
I need to know from my local broker how many clients are connected to each of my remote brokers.
What I'd do is brigde in the appropriate $SYS/
branch of the remote broker into a broker-specific branch on your local broker; you can then query the values locally. Look around this topic
$SYS/broker/clients/connected 751
from mqtt-launcher.
Ah, I totally overlooked topic remapping.
Thanks for the tip!
from mqtt-launcher.
Related Issues (20)
- Run as SystemD Service HOT 4
- Difficulty running python script with mqtt-launcher HOT 9
- "Command returned non-zero exit status 2" HOT 2
- Seems to be missing mqtt messages HOT 1
- Open URL in Default Browser HOT 2
- What causes this loop? HOT 1
- bash script will not execute HOT 8
- Commands not being actioned HOT 7
- Keepalive, timeout and client disconnection HOT 3
- Possible to run programs in the background? HOT 1
- transfer number from topic to exec HOT 2
- Don't know why the command is not executed HOT 7
- Not a real issue - more a problem - maybe depends on Subprocess - Killall does not work in MQTT Command. HOT 11
- No matching param... HOT 2
- Usage of individual payload within arguments HOT 1
- Usage of payload within arguments HOT 1
- Script work under Windows with Python HOT 8
- Blocking commands result in queued actions.
- json support HOT 3
- Program arguments from payload HOT 3
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 mqtt-launcher.