How to test MQTT using MQTTX?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video I'm going to show you how we can execute the qtt or mq transport Telemetry transactions using the application thank you DTX I'm going to show you how to connect publish And subscribe to mqtt transactions using the mosquito fqtt broker are you excited let's start exploring [Music] thank you before we proceed let's discuss first what mqtt is in a nutshell the image shows the typical mqtt setup for it you have the mqtt broker in the middle and several clients attached to it IELTS can either be a source or the publisher or the receiver or the inform or the subscriber or they can be bought the publisher and the subscriber model of mqtt then we can have multiple clients can communicate with each other without hard coding the connections between them mosquito mqtt broker in the middle serves as the middle man that will handle the message exchange between the sender and I intended receivers to the concept or topic means it is the subject of information like the current temperature or the state of light so for example the temperature here that a client wants to send is 29 and he wants all the clients that subscribe to the temperature to receive this aperture which is 29. in this case client 3 and client power will be able to receive the temperature by you is 29. in order to test mqtt I'm going to introduce to you a tool of the mqtc actors that is the sample of the mqttx which you can test out to publish And subscribe the nqtt transactions you can download it from this link and it is available in PC map and Linux platforms after you finish installing it you just need to create a new connection by clicking this button enter the hosts that you want to connect to so in here there is the mqtt or mqtts which is the secure WS refers to websocket layer there are other options here that you can set like the username for the password or the SSL and the TLs epure and qtt broker is secured for now we'll just click the connect button and we are now able to connect to our futt mosquito broker in my case here I have already created that connection so I just create the connect button here as you can see I am now connected once you are connected then you just need to create a new subscription in the new subscription you can set the topic that you want to subscribe to so for example in my case I would like to subscribe to the temperature fqtt topic then you can set the Qs logo levels either 0 1 or 2. I have subscribed to the temperature so I I just canceled if this now but you can see this is my temperature subscription let us try publishing a message to this topic using the mqtt underscore path command of Mexico so let us try publishing a message to this topic using the mqtt pub command of our mosquito so this is the mqtt pub command and I'm going to send a message 25w as level of 0 on the topic temperature if I click enter here then you would notice that the background that my activity X was able to receive temperature settings let's try again I'll just change the 25 into 30 I click enter and as you can see temperature 30 was received by our qttd X application now let us try subscribe the subscribing part by using the mqtt it's a underscore sub command of mosquito I'm just going to clear here and then I'm going to subscribe to the same topic which is temperature right now this terminal will just wait for 10 qtt messages coming from my mosquito broker publish a particular topic from the mqttx application we'll just need to set the the topic here and the value that you want or the message that you want to send you can set the payload as either Json latex or the other options here but I just send this I just keep it to the Json format once you are okay with this one then just click the send button here as you can see the topic temperature was sent and if we checked our terminal and you would notice that I was able to receive the value which is 29. that really is how helpful this mqttx application is when it comes to testing your mqtt transaction companion write up of this video contains much more detailed explanation of this project the right app can be found in the description of this video I hope you learned something happy exploring
Info
Channel: DonskyTech
Views: 7,515
Rating: undefined out of 5
Keywords: mqtt, mqttx, mosquitto
Id: Fhk-x-QD5XQ
Channel Id: undefined
Length: 5min 51sec (351 seconds)
Published: Sun Jan 15 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.